/********************************************************************************************/
/* Web Team 2009 - Vibal Publishing House Inc.												*/ 
/* This code is intended for study purposes.                                                */
/* You may use these functions as you wish, for commercial or non-commercial applications,  */
/* but please note that the author offers no guarantees to their usefulness, suitability or */
/* correctness, and accepts no liability for any losses caused by their use.                */
/********************************************************************************************/

$(document).ready(function(){    
	$(".productSupplements .img1").css({"background":"url(images/sup1.png)"});
	$(".productSupplements .img2").css({"background":"url(images/sup2.png)"});
	$(".productSupplements .img3").css({"background":"url(images/sup3.png)"});	
	
	$(".productSupplements .img1").mouseover(function(){
		//$(this).css({"opacity":"1"});				
		$(".productSupplements .img2").css({"opacity":"0.9"});
		$(".productSupplements .img3").css({"opacity":"0.9"});
	}).mouseleave(function(){
		$(this).css({"opacity":"1"});
		$(".productSupplements .img2").css({"opacity":"1"});
		$(".productSupplements .img3").css({"opacity":"1"});
	});
	
	$(".productSupplements .img2").mouseover(function(){
		$(this).css({"opacity":"1"});
		$(".productSupplements .img1").css({"opacity":"0.9"});
		$(".productSupplements .img3").css({"opacity":"0.9"});
	}).mouseleave(function(){
		$(this).css({"opacity":"1"});
		$(".productSupplements .img1").css({"opacity":"1"});
		$(".productSupplements .img3").css({"opacity":"1"});
	});	
	
	$(".productSupplements .img3").mouseover(function(){
		$(this).css({"opacity":"1"});
		$(".productSupplements .img2").css({"opacity":"0.9"});
		$(".productSupplements .img1").css({"opacity":"0.9"});
	}).mouseleave(function(){
		$(this).css({"opacity":"1"});
		$(".productSupplements .img2").css({"opacity":"1"});
		$(".productSupplements .img1").css({"opacity":"1"});
	});	
	
    /* SUPPLEMENTARY PRODUCTS SCRIPT */
	$('#dialog').dialog({
		bgiframe: true,
		modal: true,
		autoOpen: false,
		width: 600,
		height: 300,
		maxWidth: 600,
		maxHeight: 300,
		minWidth: 600,
		minHeight: 300,
		draggable: false,
	    buttons: {
		        /*  
				"Ok": function() { 
					$(this).dialog("close"); 
				},*/ 
				"Exit": function() { 
				$(this).dialog("close"); 
			} 
		}
	});
	
	// Dialog Link
	$('#dialog_link').click(function(){
			$('#dialog').dialog('open');			
			return false;		
	});    
	$("#dialog_link").css({"cursor":"pointer"});
	$(".img1").css({"cursor":"pointer"});
	$(".img2").css({"cursor":"pointer"});
	$(".img3").css({"cursor":"pointer"});
	
	$(".img1").click(function(){ document.location = 'chikiting.php'; });
	$(".img2").click(function(){ document.location = 'multimedia.php'; });
	$(".img3").click(function(){ document.location = 'http://mejiamarino.photoshop.com'; });
	/* end */
	
	
	
    $(".preSchool").mouseover(function(){
          	$(".preSchool .top").css({"background":"url(images/ebooks_preschool.jpg)","opacity":"0.8"});			
			$(this).css({"cursor":"pointer"});	
    }).mouseout(function(){
		    $(".preSchool .top").css({"background":"transparent"});
    }).click(function(){
		document.location = 'preschool.php';
	});

    $(".gradeSchool").mouseover(function(){
          	$(".gradeSchool .top").css({"background":"url(images/ebooks_gradeschool.jpg)","opacity":"0.8"});			
			$(this).css({"cursor":"pointer"});	
    }).mouseout(function(){
		    $(".gradeSchool .top").css({"background":"transparent"});
    }).click(function(){
		document.location = 'gradeschool.php';
	});	
	
	$(".highSchool").mouseover(function(){
          	$(".highSchool .top").css({"background":"url(images/ebooks_highschool.jpg)","opacity":"0.8"});			
			$(this).css({"cursor":"pointer"});	
    }).mouseout(function(){
		    $(".highSchool .top").css({"background":"transparent"});
    }).click(function(){
		document.location = 'highschool.php';
	});		

	$(".college").mouseover(function(){
          	$(".college .top").css({"background":"url(images/ebooks_college.jpg)","opacity":"0.8"});			
			$(this).css({"cursor":"pointer"});	
    }).mouseout(function(){
		    $(".college .top").css({"background":"transparent"});
    }).click(function(){
		document.location = 'college.php';
	});		
	
	
	// PRODUCTS.PHP
	$("#ubd").click(function (){ document.location.href = 'http://vibalpublishing.com/news.php?m=nv&nid=42' }).mouseover(function(){ $(this).css({"cursor":"pointer"}) });    					
	$("#salesInquiry").click(function (){ document.location.href = 'mailto:sales@vibalpublishing.com' }).mouseover(function(){ $(this).css({"cursor":"pointer"}) });    				

	
	// DISQUSS	    
	
  });