/**
 * jQuery Remove background flicker in Internet Explorer
 */
$(document).ready(function(){
  //If browser is IE, disable BackgroundImageCache
  if (jQuery.browser.msie)
  {
    try
    {
      document.execCommand("BackgroundImageCache", false, true);
    } catch(err){}
  }
});

/**
 * Lightbox Counter
 */
function xCounter(id, count) { // count the hits
  if (count != "no"){
 	$.ajax({
   		type: "GET",
   		url: "/ajax/counter.php",
   		data: "id="+id
	});  	
  }
}


$(document).ready(function(){

    var options = {
		//assetURL: 			'/js/shadowbox2/images/',
        resizeLgImages:     true,
		//loadingImage:		'loading.gif',
		//overlayBgImage: 	'raster.gif',
		//overlayColor:		'transparent',
		//overlayOpacity:		0.5,
		//resizeDuration:		0.5,
        displayNav:         true,
        handleUnsupported:  'remove',
        keysClose:          ['c', 27] // c or esc
    };

    Shadowbox.init(options);

	/*
    Shadowbox.init({
        skipSetup: true // skip the automatic setup
    });
	*/

	$("#chatbox").load("/chat/ajax/whoisonline.php");
	
	/*
	$.jheartbeat.set({
   		url: "/yshout/history/posts.php", // The URL that jHeartbeat will retrieve
	    delay: 15000, // How often jHeartbeat should retrieve the URL
	    div_id: "shoutbox" // Where the data will be appended.
	}, function () {
		$("#shoutbox").fadeIn().html();
	});
	*/

});

$(document).ready(function(){
	$('#mndrop-menu').hide();
	$('#mndrop-head').toggle(
		function(){	$('#mndrop-menu').fadeIn(250); },
		function(){ $('#mndrop-menu').fadeOut(250); }
	);
	
	$('.media').media();
});
