// JavaScript Document
$(document).ready(function() {
	//To position the main carousal in center: starts here
	$("#carousel").css("margin-left",-(2781/3)+'px');
	//To position the main carousal in center: ends here
	
	$("#bannerRM").css('display','inline');
	$("#bannerRM").css('left',$(window).width()-297);
	$("#bannerRM").css('top',$(document).height());
	$("#bannerButterFly").css('display','inline');
	$("#bannerButterFly").css('top',$(document).height()-234).css('left',0).css('margin-left',-47);		
	posButterFly = ($(window).width() - 996)/2
	$("#bannerButterFly").css('top',$(document).height()-234).css('left',posButterFly);
	$("#leftPanel").height($(document).height()-864-181);
	$("#rightPanel").height($(document).height()-864-203);	

	if($.browser.msie) {
		/*Ensures page is fully loaded*/		
		$(window).load(function () {
		$("#wraperHeadHome").css('backgroundPosition','0px 3px');
		/*Class for index layout*/
		$("#leftPanel").height($(document).height()-864-40);
		$("#rightPanel").height($(document).height()-864-204);
		$("#bannerButterFly").css('top',$(document).height()-234).css('left',posButterFly);	
		
		/*Classes for coolness page layout*/
		$("#leftPanelSpl").height($(document).height()-264-210);
		$("#rightPanelSpl").height($(document).height()-264-200);
		
		/*Common for BollyV page layout*/
		$("#leftPanelSpl2").height($(document).height()-800-172);
		$("#rightPanelSpl2").height($(document).height()-780-250);
				
		/*Common for Shows page layout*/
		$("#leftPanelSpl4").height($(document).height()-864-172);
		$("#rightPanelSpl4").height($(document).height()-864-207);
		
		/*Common for Style page layout*/
		$("#leftPanelSpl5").height($(document).height()-864-251);
		$("#rightPanelSpl5").height($(document).height()-864-206);
		
		/*Common for LAMO page layout*/
		$("#leftPanelSpl6").height($(document).height()-800-172);
		$("#rightPanelSpl6").height($(document).height()-820-207);
				
		/*Common for Campus page layout*/
		$("#leftPanelSpl7").height($(document).height()-800-172);
		$("#rightPanelSpl7").height($(document).height()-830-207);		
		
		/*For LoveNet: it has special height setting*/
		$("#leftPanelLoveNet").height($(document).height()-264-2200);
		$("#rightPanelLoveNet").height($(document).height()-864-203);
		
		/*For VJs: it has special height setting*/
		$("#leftPanelVJs").height($(document).height()-264-1735);
		$("#rightPanelVJs").height($(document).height()-864-208);
		
		/*For Games & Downloads: it has special height setting*/
		$("#leftPanelSpl3").height($(document).height()-480);
		$("#rightPanelSpl3").height($(document).height()-450);
		});
	}
	
	if($.browser.mozilla) {
		/*Ensures page is fully loaded*/		
		$(window).load(function () {
		/*Class for index layout*/
		$("#leftPanel").height($(document).height()-864-172);
		$("#rightPanel").height($(document).height()-864-204);
		$("#bannerButterFly").css('top',$(document).height()-234).css('left',posButterFly);	
		
		/*Classes for Coolness page layout*/
		$("#leftPanelSpl").height($(document).height()-264-210);
		$("#rightPanelSpl").height($(document).height()-264-197);
		
		/*Common for BollyV page layout*/
		$("#leftPanelSpl2").height($(document).height()-864-172);
		$("#rightPanelSpl2").height($(document).height()-864-185);
				
		/*Common for Shows page layout*/
		$("#leftPanelSpl4").height($(document).height()-930-172);
		$("#rightPanelSpl4").height($(document).height()-864-185);
		
		/*Common for Style page layout*/
		$("#leftPanelSpl5").height($(document).height()-920-292);
		$("#rightPanelSpl5").height($(document).height()-845-224);
		
		/*Common for LAMO page layout*/
		$("#leftPanelSpl6").height($(document).height()-864-172);
		$("#rightPanelSpl6").height($(document).height()-864-204);
				
		/*Common for Campus page layout*/
		$("#leftPanelSpl7").height($(document).height()-864-172);
		$("#rightPanelSpl7").height($(document).height()-864-185);	
		
		/*For LoveNet: it has special height setting*/
		$("#leftPanelLoveNet").height($(document).height()-264-2280);
		$("#rightPanelLoveNet").height($(document).height()-864-204);
		
		/*For VJs: it has special height setting*/
		$("#leftPanelVJs").height($(document).height()-264-1765);
		$("#rightPanelVJs").height($(document).height()-864-220);
		
		/*For Games & Downloads: it has special height setting*/
		$("#leftPanelSpl3").height($(document).height()-400);
		$("#rightPanelSpl3").height($(document).height()-485);
		});		

	}	
	
	if($.browser.safari) {
		/*Ensures page is fully loaded*/		
		$(window).load(function () {

		$("div.foooter-wrapper").height(200);
		
		/*Class for index layout*/
		$("#leftPanel").height($(document).height()-950);
		$("#rightPanel").height($(document).height()-1070);
		$("#bannerButterFly").css('top',$(document).height()-234).css('left',posButterFly);	
		
		/*Classes for Coolness page layout*/
		$("#leftPanelSpl").height($(document).height()-264-200);
		$("#rightPanelSpl").height($(document).height()-264-200);
		
		/*Common for BollyV page layout*/
		$("#leftPanelSpl2").height($(document).height()-864-172);
		$("#rightPanelSpl2").height($(document).height()-845-205);
				
		/*Common for Shows page layout*/
		$("#leftPanelSpl4").height($(document).height()-930-172);
		$("#rightPanelSpl4").height($(document).height()-845-205);
		
		/*Common for Style page layout*/
		$("#leftPanelSpl5").height($(document).height()-1000-200);
		$("#rightPanelSpl5").height($(document).height()-864-204);
		
		/*Common for LAMO page layout*/
		$("#leftPanelSpl6").height($(document).height()-864-192);
		$("#rightPanelSpl6").height($(document).height()-845-224);
				
		/*Common for Campus page layout*/
		$("#leftPanelSpl7").height($(document).height()-864-195);
		$("#rightPanelSpl7").height($(document).height()-845-205);	
		
		/*For LoveNet: it has special height setting*/
		$("#leftPanelLoveNet").height($(document).height()-2550);
		$("#rightPanelLoveNet").height($(document).height()-1070);
		
		/*For VJs: it has special height setting*/
		$("#leftPanelVJs").height($(document).height()-264-1810);
		$("#rightPanelVJs").height($(document).height()-845-240);
		
		/*For Games & Downloads: it has special height setting*/
		$("#leftPanelSpl3").height($(document).height()-450);
		$("#rightPanelSpl3").height($(document).height()-490);		
		});
	}	
	
	if(navigator.appVersion.indexOf("Mac") != -1) {		
		$(".pink-ribbon1").css('margin-top','-2px');
		//$("#wraperHeadHome").css('backgroundPosition','0px 1px');
		//css({backgroundPosition: '10px 20px'});
	}
});

function closeRM() {
	document.getElementById('bannerRM').style.display = 'none';
}