// JavaScript Document

$(document).ready(function(){ // DROP DOWN MENU STARTED
var MenuBar1 = new Spry.Widget.MenuBar("MenuBar1", {imgDown:"SpryAssets/SpryMenuBarDownHover.gif", imgRight:"SpryAssets/SpryMenuBarRightHover.gif"});
});


$(document).ready(function(){
$("#various5, #various6").click(function() { // YouTube Video SCRIPT STARTED
	$.fancybox({
			'padding'		: 0,
			'autoScale'		: false,
			'transitionIn'	: 'none',
			'transitionOut'	: 'none',
			'title'			: this.title,
			'width'		: 680,
			'height'		: 495,
			'href'			: this.href.replace(new RegExp("watch\\?v=", "i"), 'v/'),
			'type'			: 'swf',
			'swf'			: {
			   	 'wmode'		: 'transparent',
				'allowfullscreen'	: 'true'
			}
		});

	return false;
	});
}); // YouTube Video SCRIPT ENDED

var name = "#floatMenu";  // FLOAT MENU SCRIPT STARTED
var menuYloc = null;  
$(document).ready(function(){  
    menuYloc = parseInt($(name).css("top").substring(0,$(name).css("top").indexOf("px")))  
    $(window).scroll(function () {  
        var offset = menuYloc+$(document).scrollTop()+"px";  
        $(name).animate({top:offset},{duration:500,queue:false});  
    });
}); // FLOAT MENU SCRIPT ENDED

$(document).ready(function(){ // SPECIAL DISCOUNT FORM
				$("#num_of_users").change(function () {
					var i = $("#num_of_users option:selected").text()
					//alert($("#regdescription").val());
					
					if(i == 'Single User'){
						$("input#inputregdesc").val("Online Learning Registration(Single User)");
						$("input#regprice").val("125");
						$("input#regdescription").val("For Single User (Registration Fee : $125.00)");
						$("input#yousave").hide();
					}else{
						$("input#inputregdesc").val("Online Learning Registration(Group of 10 Users)");
						$("input#regprice").val("1100");
						$("input#regdescription").val("For Group of 10 Users (Registration Fee : $1,100.00)");
						$("input#yousave").val("You Save $ 150.00");
						$("input#yousave").show();
					}
				});
			});
			
			function validation(){
				if(frmpaypal.title.value == "" || frmpaypal.company.value == ""){
					alert('Please fill both fields ... !');
					return false;
				}
			}
			

$(document).ready(function(){ // SPECIAL DISCOUNT FORM
$("#various3").fancybox({
				'width'				: 800,
				'height'			: 556,
				'autoScale'			: false,
				'transitionIn'		: 'fade',
				'transitionOut'		: 'fade',
				'type'				: 'iframe',
				'padding'			: 3
			});
}); // FLOAT MENU SCRIPT ENDED


$(document).ready(function() {	// Book Review Box Strated
 // hides the bookBox as soon as the DOM is ready
  $('#bookBox').hide();
 // shows the bookBox on clicking the noted link  
  $('#book-show').click(function() {
    $('#bookBox').fadeIn('slow');
    return false;
  });
 // hides the bookBox on clicking the noted link  
  $('#book-hide').click(function() {
    $('#bookBox').fadeOut('slow');
    return false;
  });
});	// Book Review Box Ended
