/************* VIBAL 09 WEB TEAM PROGRAMMER  **************/
$(document).ready(function (){
   
	$(".iTeachBox .imgBox1").css({"background":"#fff","opacity":".60"});
	$(".iTeachBox .imgBox2").css({"background":"#fff","opacity":".60"});
	$(".iTeachBox .imgBox3").css({"background":"#fff","opacity":".60"});
	$(".iTeachBox .imgBox4").css({"background":"#fff","opacity":".60"});
	$(".iTeachBox .imgBox5").css({"background":"#fff","opacity":".60"});	
	
	$(".iTeachBox .imgBox1").hover(
		function(){	
			$(".imgBox1").css({"opacity":"0"});					
			if($(".imgBox2").css("opacity") == 0 || $(".imgBox3").css("opacity") == 0 || $(".imgBox4").css("opacity") == 0 || $(".imgBox5").css("opacity") == 0){
				$(".imgBox2").css({"opacity":".60"}); 
				$(".imgBox3").css({"opacity":".60"});		
				$(".imgBox4").css({"opacity":".60"});
				$(".imgBox5").css({"opacity":".60"});				
				$(".imgBox1").css({"opacity":"0"});		

			}
		},
		function(){	
			//do nothing..
		}		
	);
	$(".iTeachBox .imgBox2").hover(
		function(){	
			$(".imgBox2").css({"opacity":"0"});							
			if($(".imgBox1").css("opacity") == 0 || $(".imgBox3").css("opacity") == 0 || $(".imgBox4").css("opacity") == 0 || $(".imgBox5").css("opacity") == 0){
				$(".imgBox1").css({"opacity":".60"}); 
				$(".imgBox3").css({"opacity":".60"});		
				$(".imgBox4").css({"opacity":".60"});
				$(".imgBox5").css({"opacity":".60"});				
				$(".imgBox2").css({"opacity":"0"});		
			}
		},
		function(){	
			//do nothing..
		}		
	);
	$(".iTeachBox .imgBox3").hover(
		function(){	
			$(".imgBox3").css({"opacity":"0"});							
			if($(".imgBox2").css("opacity") == 0 || $(".imgBox1").css("opacity") == 0 || $(".imgBox4").css("opacity") == 0 || $(".imgBox5").css("opacity") == 0){
				$(".imgBox2").css({"opacity":".60"}); 
				$(".imgBox1").css({"opacity":".60"});		
				$(".imgBox4").css({"opacity":".60"});
				$(".imgBox5").css({"opacity":".60"});				
				$(".imgBox3").css({"opacity":"0"});		
			}
		},
		function(){	
			//do nothing..
		}		
	);
	$(".iTeachBox .imgBox4").hover(
		function(){	
			$(".imgBox4").css({"opacity":"0"});							
			if($(".imgBox2").css("opacity") == 0 || $(".imgBox3").css("opacity") == 0 || $(".imgBox1").css("opacity") == 0 || $(".imgBox5").css("opacity") == 0){
				$(".imgBox2").css({"opacity":".60"}); 
				$(".imgBox3").css({"opacity":".60"});		
				$(".imgBox1").css({"opacity":".60"});
				$(".imgBox5").css({"opacity":".60"});				
				$(".imgBox4").css({"opacity":"0"});		
			}
		},
		function(){	
			//do nothing..
		}		
	);
	$(".iTeachBox .imgBox5").hover(
		function(){	
			$(".imgBox5").css({"opacity":"0"});							
			if($(".imgBox2").css("opacity") == 0 || $(".imgBox3").css("opacity") == 0 || $(".imgBox4").css("opacity") == 0 || $(".imgBox1").css("opacity") == 0){
				$(".imgBox2").css({"opacity":".60"}); 
				$(".imgBox3").css({"opacity":".60"});		
				$(".imgBox4").css({"opacity":".60"});
				$(".imgBox1").css({"opacity":".60"});				
				$(".imgBox5").css({"opacity":"0"});		
			}
		},
		function(){	
			//do nothing..
		}		
	);	
	
	
	
	$("#ubdict").css({"cursor":"pointer"});	
    $("#ubdict").click(function(){ document.location = 'http://www.vibalpublishing.com/sales/files/2009-10-30-15.41.00.pdf' });	
	$(".iTeachBox").css({"cursor":"pointer"});	
	$(".nav").css({"cursor":"pointer"});	
	
	/*
	$("#aa").css({"background":"#fb51b4"});
	$("#bb").css({"background":"#ef4dab"});	
	$("#cc").css({"background":"#e249a2"});	
	$("#dd").css({"background":"#d54498"});	
	$("#ee").css({"background":"#c8408f"});	
	$("#ff").css({"background":"#bc3b86"});	
	*/
	
	$("#gg").css({"background":"#e7d024"});
	$("#hh").css({"background":"#dac523"});	
	$("#ii").css({"background":"#cbb721"});	
	$("#jj").css({"background":"#beac1f"});	
	$("#kk").css({"background":"#b09f1c"});	
	$("#ll").css({"background":"#a4941a"});	
    
	$("#mm").css({"background":"#20b85c"});
	$("#nn").css({"background":"#1da955"});	
	$("#oo").css({"background":"#1b9a4d"});	
	$("#pp").css({"background":"#188c46"});	
	$("#qq").css({"background":"#157e3f"});	
	$("#rr").css({"background":"#127138"});	
    /*
	$("#ss").css({"background":"#fb51b4"});	
	$("#tt").css({"background":"#ef4dab"});	
	$("#uu").css({"background":"#e249a2"});	
	$("#vv").css({"background":"#d54498"});		
	*/
	$("#ww").css({"background":"#b0dd44"});			
	$("#xx").css({"background":"#a5d13b"});			
	$("#yy").css({"background":"#9bc632"});				
	$("#zz").css({"background":"#90ba2b"});			
	$("#a1").css({"background":"#85ae23"});			
	$("#a2").css({"background":"#7ba21c"});					
	 /* SUBJECTS OF ITEACH.... */

	$('#dialog1').dialog({
		bgiframe: true,
		modal: true,
		autoOpen: false,
		width: 650,
		height: 450,
		maxWidth: 650,
		maxHeight: 450,
		minWidth: 650,
		minHeight: 450,
		draggable: false,
		closeOnEscape:  false,
	    buttons: {				
				"Exit": function() { 
					$('#EngSub1').hide();
					$('#EngSub2').hide();
					$('.links').show();								
					$(this).dialog("close"); 				

				} 
				/*
				"Menu": function() { 
					$('#EngSub1').hide();
					$('#EngSub2').hide();
					$('.links').show();								
					$('#abretxt p').html("Select the grade level of the ABRE textbook that you are using for the matrix of e-learning materials for that level.");								
				} 
				*/
		}
	});
	
	$('#dialog2').dialog({
		bgiframe: true,
		modal: true,
		autoOpen: false,
		width: 650,
		height: 450,
		maxWidth: 650,
		maxHeight: 450,
		minWidth: 650,
		minHeight: 450,
		draggable: false,
		closeOnEscape:  false,		
	    buttons: {
				"Exit": function() { 
				$(this).dialog("close"); 
			} 
		}
	});
	
	$('#dialog3').dialog({
		bgiframe: true,
		modal: true,
		autoOpen: false,
		width: 650,
		height: 450,
		maxWidth: 650,
		maxHeight: 450,
		minWidth: 650,
		minHeight: 450,
		draggable: false,
		closeOnEscape:  false,				
	    buttons: {
				"Exit": function() { 
				$(this).dialog("close"); 
			} 
		}
	});	
	
	$('#dialog4').dialog({
		bgiframe: true,
		modal: true,
		autoOpen: false,
		width: 650,
		height: 450,
		maxWidth: 650,
		maxHeight: 450,
		minWidth: 650,
		minHeight: 450,
		draggable: false,
		closeOnEscape:  false,				
	    buttons: {
				"Exit": function() { 
				$(this).dialog("close"); 
			} 
		}
	});			
	
	$('#dialog5').dialog({
		bgiframe: true,
		modal: true,
		autoOpen: false,
		width: 650,
		height: 450,
		maxWidth: 650,
		maxHeight: 450,
		minWidth: 650,
		minHeight: 450,
		draggable: false,
		closeOnEscape:  false,				
	    buttons: {
				"Exit": function() { 
				$(this).dialog("close"); 
			} 
		}
	});				
		
	//END
	
	// Other Resources..
	
	$('#OtherResources').click(function(){	      
		$("#OtherResourcesC").show("slow");		 		 							
		$("#OtherResources").hide("slow");		 		 							
	}).mouseover(function(){ 
		$(this).css({"cursor":"pointer"});	
	});
	
	$('#close2').click(function(){	      
		$("#OtherResourcesC").hide("slow");		 		 							
		$("#OtherResources").show("slow");		 		 							
	}).mouseover(function(){ 
		$(this).css({"cursor":"pointer"});	
	});	
	
	
	
	$('#Exemplars').click(function(){	      
		$("#ExemplarsC").show("slow");		 		 							
		$("#Exemplars").hide("slow");		 		 							
	}).mouseover(function(){ 
		$(this).css({"cursor":"pointer"});	
	});	
	
	$('#close1').click(function(){	      
		$("#ExemplarsC").hide("slow");		 		 							
		$("#Exemplars").show("slow");		 		 							
	}).mouseover(function(){ 
		$(this).css({"cursor":"pointer"});	
	});	

	


	// Dialog Link
	$('.imgBox1').click(function(){
			$('#dialog1').dialog('open');			
			return false;		
	});    	
	$('.imgBox2').click(function(){
			$('#dialog2').dialog('open');			
			return false;		
	});    		
	$('.imgBox3').click(function(){
			$('#dialog3').dialog('open');			
			return false;		
	});    		
	
	$('.imgBox4').click(function(){
			$('#dialog4').dialog('open');			
			return false;		
	});    			
	
	$('.imgBox5').click(function(){
			$('#dialog5').dialog('open');			
			return false;		
	});    				
	
	$('#abre').click(function(){
			$('.links').hide('slow');
			$('#EngSub1').show('slow');			
			//$('#abretxt p').html("Welcome to the book site for Across Borders Through Reading or ABRE Grade 1-6. You can find additional activities for your ABRE textbook here. Use the menu on the right to access the online activities for your lessons.");
			
			return false;	

	});    		
	$('#langlit').click(function(){
			$('.links').hide('slow');
			$('#EngSub2').show('slow');			
			//$('#abretxt p').html("Welcome to the book site for Language and Literature or LangLit Highschool I-V. You can find additional activities for your LangLit textbook here. Use the menu on the right to access the online activities for your lessons.");			
			return false;		
	});    		

	
	$("#abre").css({"cursor":"pointer", "color":"#009de0"});		
	$("#langlit").css({"cursor":"pointer", "color":"#009de0"});			
	/* end */
	
	/** ENGLISH ACROSS BORDERS THROUGH READING **/
	$("#aa").click(function(){				
		document.location = 'http://www.vibalpublishing.com/toc.php?map=abre1';
	});
	$("#bb").click(function(){				
		document.location = 'http://www.vibalpublishing.com/toc.php?map=abre2';
	});	
	$("#cc").click(function(){				
		document.location = 'http://www.vibalpublishing.com/toc.php?map=abre3';
	});		
	$("#dd").click(function(){				
		document.location = 'http://www.vibalpublishing.com/toc.php?map=abre4';
	});			
	$("#ee").click(function(){				
		document.location = 'http://www.vibalpublishing.com/toc.php?map=abre5';
	});				
	$("#ff").click(function(){				
		document.location = 'http://www.vibalpublishing.com/toc.php?map=abre6';
	});					
	
	/** SOCIAL STUDIES SUBJECTS **/
	$("#gg").click(function(){				
		document.location = 'http://www.vibalpublishing.com/toc.php?map=ocop1';
	});	
	$("#hh").click(function(){				
		document.location = 'http://www.vibalpublishing.com/toc.php?map=ocop2';
	});		
	$("#ii").click(function(){				
		document.location = 'http://www.vibalpublishing.com/toc.php?map=ocop3';
	});	
	$("#jj").click(function(){				
		document.location = 'http://www.vibalpublishing.com/toc.php?map=ocop4';
	});	
	$("#kk").click(function(){				
		document.location = 'http://www.vibalpublishing.com/toc.php?map=ocop5';
	});	
	$("#ll").click(function(){				
		document.location = 'http://www.vibalpublishing.com/toc.php?map=ocop6';
	});		

	$("#bsl").click(function(){	
		
		//document.location = 'http://www.vibalpublishing.com/toc.php?map=kkk1';
	});			
	
	/** FILIPINO SUBJECTS **/
	$("#mm").click(function(){				
		document.location = '#';
	});	
	$("#nn").click(function(){				
		document.location = '#';
	});		
	$("#oo").click(function(){				
		document.location = '#';
	});	
	$("#pp").click(function(){				
		document.location = '#';
	});	
	$("#qq").click(function(){				
		document.location = '#';
	});	
	$("#rr").click(function(){				
		document.location = '#';
	});		
		
	/** FILIPINO YAMAN **/
	$("#y1").click(function(){				
		document.location = 'http://www.vibalpublishing.com/hstoc.php?map=yaman1';
	});			
	$("#y2").click(function(){				
		document.location = 'http://www.vibalpublishing.com/hstoc.php?map=yaman2';
	});			
	$("#y2").click(function(){				
		document.location = 'http://www.vibalpublishing.com/hstoc.php?map=yaman3';
	});			
	$("#y2").click(function(){				
		document.location = 'http://www.vibalpublishing.com/hstoc.php?map=yaman4';
	});				
		
		
	/** ENGLISH - LANGUAGE AND LITERATURE **/
	$("#ss").click(function(){				
		document.location = 'http://www.vibalpublishing.com/hstoc.php?map=langlit1';
	});	
	$("#tt").click(function(){				
		document.location = 'http://www.vibalpublishing.com/hstoc.php?map=langlit2';
	});		
	$("#uu").click(function(){				
		document.location = 'http://www.vibalpublishing.com/hstoc.php?map=langlit3';
	});	
	$("#vv").click(function(){				
		document.location = 'http://www.vibalpublishing.com/hstoc.php?map=langlit4';
	});	
	
	/** ENGLISH - ABLA **/
	$("#a1").click(function(){				
		document.location = 'http://www.vibalpublishing.com/toc.php?map=abla1';
	});	
	$("#a2").click(function(){				
		document.location = 'http://www.vibalpublishing.com/toc.php?map=abla2';
	});		
	$("#a3").click(function(){				
		document.location = 'http://www.vibalpublishing.com/toc.php?map=abla3';
	});	
	$("#a4").click(function(){				
		document.location = 'http://www.vibalpublishing.com/toc.php?map=abla4';
	});		
	$("#a5").click(function(){				
		document.location = 'http://www.vibalpublishing.com/toc.php?map=abla5';
	});		
	$("#a6").click(function(){				
		document.location = 'http://www.vibalpublishing.com/toc.php?map=abla6';
	});			
	
	
	/** HighSchool - kkk **/
	$("#hskkk1").click(function(){				
		document.location = 'http://www.vibalpublishing.com/hstoc.php?map=hskkk1';
	}).mouseover(function(){ $(this).css({"cursor":"pointer"}); });	
	$("#hskkk2").click(function(){				
		document.location = 'http://www.vibalpublishing.com/hstoc.php?map=hskkk2';
	}).mouseover(function(){ $(this).css({"cursor":"pointer"}); });	
	$("#hskkk3").click(function(){				
		document.location = 'http://www.vibalpublishing.com/hstoc.php?map=hskkk3';
	}).mouseover(function(){ $(this).css({"cursor":"pointer"}); });	
	$("#hskkk4").click(function(){				
		document.location = 'http://www.vibalpublishing.com/hstoc.php?map=hskkk4';
	}).mouseover(function(){ $(this).css({"cursor":"pointer"}); });	

	
	
	
	/** HighSchool - chp **/
	$("#hschp1").click(function(){				
		document.location = 'http://www.vibalpublishing.com/hstoc.php?map=hschp1';
	}).mouseover(function(){ $(this).css({"cursor":"pointer"}); });	
	$("#hschp2").click(function(){				
		document.location = 'http://www.vibalpublishing.com/hstoc.php?map=hschp2'
	}).mouseover(function(){ $(this).css({"cursor":"pointer"}); });	
	$("#hschp3").click(function(){				
		document.location = 'http://www.vibalpublishing.com/hstoc.php?map=hschp3';
	}).mouseover(function(){ $(this).css({"cursor":"pointer"}); });	
	$("#hschp4").click(function(){				
		document.location = 'http://www.vibalpublishing.com/hstoc.php?map=hschp4';
	}).mouseover(function(){ $(this).css({"cursor":"pointer"}); });	
	
	
	/** HighSchool - values **/
	$("#hsvalues1").click(function(){				
		document.location = 'http://www.vibalpublishing.com/hstoc.php?map=values_and_virtues1';
	}).mouseover(function(){ $(this).css({"cursor":"pointer"}); });	
	$("#hsvalues2").click(function(){				
		document.location = 'http://www.vibalpublishing.com/hstoc.php?map=values_and_virtues2'
	}).mouseover(function(){ $(this).css({"cursor":"pointer"}); });	
	$("#hsvalues3").click(function(){				
		document.location = 'http://www.vibalpublishing.com/hstoc.php?map=values_and_virtues3';
	}).mouseover(function(){ $(this).css({"cursor":"pointer"}); });	
	$("#hsvalues4").click(function(){				
		document.location = 'http://www.vibalpublishing.com/hstoc.php?map=values_and_virtues4';
	}).mouseover(function(){ $(this).css({"cursor":"pointer"}); });		
	
	
	/** HighSchool - science **/
	$("#hsscience1").click(function(){				
		document.location = 'http://www.vibalpublishing.com/hstoc.php?map=gensci';
	}).mouseover(function(){ $(this).css({"cursor":"pointer"}); });	
	$("#hsscience2").click(function(){				
		document.location = 'http://www.vibalpublishing.com/hstoc.php?map=biology'
	}).mouseover(function(){ $(this).css({"cursor":"pointer"}); });	
	$("#hsscience3").click(function(){				
		document.location = 'http://www.vibalpublishing.com/hstoc.php?map=chemistry';
	}).mouseover(function(){ $(this).css({"cursor":"pointer"}); });	
	$("#hsscience4").click(function(){				
		document.location = 'http://www.vibalpublishing.com/hstoc.php?map=physics';
	}).mouseover(function(){ $(this).css({"cursor":"pointer"}); });		
		
});
