//----Page_Loading----//
jQuery(window).load(function() {
	jQuery('#loading-image').hide();
	 $('#book').fadeOut('slow', function() {
  });
});
//----UserSlide----//
$(document).ready(function(){
	$(".slidingDiv").hide();
	$(".show_hide").show();
	$('.show_hide').click(function(){
		$(".slidingDiv").slideToggle();
	});
});
//----Search----//
$(document).ready(function(){
	$(".slidingDiv2").hide();
	$(".show_hide2").show();
	$('.show_hide2').click(function(){
		$(".slidingDiv2").slideToggle();
	});
});
//----Cufont----//
Cufon.replace('.menu_2', { fontFamily: 'Myriad Pro Bold', hover: true }); 
Cufon.replace('.top_link', { fontFamily: 'Myriad Pro Regular', hover: true }); 
Cufon.replace('.fpEvDays', { fontFamily: 'Myriad Pro Regular', hover: true }); 
Cufon.replace('.cfont', { fontFamily: 'Myriad Pro Regular', hover: true }); 
//----MENU----//
stuHover = function() {
	var cssRule;
	var newSelector;
	for (var i = 0; i < document.styleSheets.length; i++)
		for (var x = 0; x < document.styleSheets[i].rules.length ; x++)
			{
			cssRule = document.styleSheets[i].rules[x];
			if (cssRule.selectorText.indexOf("LI:hover") != -1)
			{
				 newSelector = cssRule.selectorText.replace(/LI:hover/gi, "LI.iehover");
				document.styleSheets[i].addRule(newSelector , cssRule.style.cssText);
			}
		}
	var getElm = document.getElementById("nav").getElementsByTagName("LI");
	for (var i=0; i<getElm.length; i++) {
		getElm[i].onmouseover=function() {
			this.className+=" iehover";
		}
		getElm[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" iehover\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", stuHover);
//RQ//
function rq(file, layer){
	$('#'+layer).append('<div class=\"overlay\" style=\"height:'+ $('#'+layer).height() +'px;background-color:#000;opacity:0.8;background-image:url(/media/img/load.gif); background-repeat:no-repeat;background-position:center center;\"></div>');
	$.get(file, function( html ){
		$('#' + layer).html(html);
	});
	return false;

  		
}
//---COMMENTS---//

function show(ele) {
         var srcElement = document.getElementById(ele);
         if(srcElement != null) {
	   if(srcElement.style.display == "block") {
   	    }
            else {
                   srcElement.style.display='block';
            }
            return false;
       }
  }
function biger(ele) {
         var srcElement = document.getElementById(ele);
         if(srcElement != null) {
	   if(srcElement.style.height == "80px") {
   	    }
            else {
                   srcElement.style.height='80px';
            }
            return false;
       }
  }
