/*
 * SimpleModal Confirm Modal Dialog
 * http://www.ericmmartin.com/projects/simplemodal/
 * http://code.google.com/p/simplemodal/
 *
 * Copyright (c) 2010 Eric Martin - http://ericmmartin.com
 *
 * Licensed under the MIT license:
 *   http://www.opensource.org/licenses/mit-license.php
 *
 * Revision: $Id: confirm.js 254 2010-07-23 05:14:44Z emartin24 $
 */
function open_modal() {
jQuery(function ($) {
    // example of calling the confirm function
    // you must use a callback function to perform the "yes" action
    confirm('<div style="font-size:30px; color:#CC0000; text-align:center;"><p><b>WARNING!<br /><span style="font-size:14px; color:#000000;"> This site contains explicit images and videos of consenting naked adult men engaging in gay sex acts.</span></b></p></div><div style="margin:auto; width:820px; text-align:center; margin-bottom:10px; -moz-border-radius: 15px; border-radius: 15px; font-size:24px; font-weight:bold; border: 3px #000000 solid; margin-top:20px; margin-bottom:20px; padding-top:20px; padding-bottom:20px; background-color:#FFFFFF;">See how one man feeds his addiction to straight men!<br /><img src="images/warning_guy.jpg" width="742" height="227" /><br />All the action caught on Brendon\'s homemade amateur videos. <br /></div><div class="buttons"><table align="center" width="100%"><tr><td width="50%" align="right"><div class="yes">Yes</div></td><td width="50%" align="left"><div class="no simplemodal-close">No</div></td></tr></table></div><div style="font-size:12px; width:800px; margin:auto; line-height:12px;"><b>Terms and Conditions of Entry:</b><br />By entering the Like-em-Straight website you certify the following and understand that we rely on your certification and agreement to these terms and conditions for you to gain entry to this site. You agree to all the terms and conditions herein under un-sworn declaration of perjury:</p><ol><li>That you are 18 years of age or older (or 21 where required). <br></li><li>That you are familiar with all local laws in your area affecting your legal right to access gay erotica or adult-oriented materials; <br></li><li>That you have the legal right to access adult-oriented materials and Like-em-Straight website has the legal right to transmit them to you; that you are requesting adult-oriented materials for your own private enjoyment and that you will never share these materials with a minor or in any manner make these materials available to a minor.</li></ol></div>', function () {
        //window.location.href = 'http://www.ericmmartin.com/projects/simplemodal/';
    });
});
}

function confirm(message, callback) {
	$('#confirm').modal({
		/*closeHTML: "<a href='#' title='Close' class='modal-close'>x</a>",
		position: ["10%",],*/
		overlayId: 'confirm-overlay',
		containerId: 'confirm-container', 
		onShow: function (dialog) {
			var modal = this;

			$('.message', dialog.data[0]).append(message);

			// if the user clicks "yes"
			$('.yes', dialog.data[0]).click(function () {
				// call the callback
				if ($.isFunction(callback)) {
					callback.apply();
				}
				// close the dialog
				$(".trailer_player").css("display","block");
				modal.close(); // or $.modal.close();
				/* var id = $('#outtakes').attr('href');

        var maskHeight = $(document).height();
        var maskWidth = $(window).width();
        var winH = $(window).height();
        var winW = $(window).width();
		
		//alert (winH + "/" + winW);
		
		var modaldiv="#outtakes";
               
        //Set the popup window to center
        $('#outtakes').css('top',  winH/2-$(modaldiv).height()/2);
        $('#outtakes').css('left', winW/2-$(modaldiv).width()/2);
     
        //transition effect
        $('#outtakes').fadeIn(2000); */
     
    //});
     
    //if close button is clicked
    $('.window .close').click(function (e) {
        //Cancel the link behavior
        e.preventDefault();
        $('#mask, .window').hide();
    });
				$.cookie("concook", "yes");
			});
			$('.no', dialog.data[0]).click(function () {
				window.location.href = 'http://www.google.com';
			});
		}
	});
}


