//jQuery.noConflict();
try{
		jQuery(document).ready(function(){
			var fly=new Object(); //fly weight object
			
			jQuery('.widget_listModuleItems.offersRotator .item .title').pukkaPNGFix();
			jQuery('.widget_listModuleItems.offersRotator .item .content').pukkaPNGFix();
			jQuery('#news-ticker').pukkaPNGFix();
			
			// now that the js is loaded show everything
			$('#holder').css({"display" : "block"})
			
			fuzzWidth=$(document).width()
			fuzzHeight=$(document).height()
			$('#fuzz').css({
				"height" : fuzzHeight,
				"width" : fuzzWidth, 
				"opacity" : '0.4',
				"left":0,
				"top":0
			});
			
			$("<div>").attr({
				"id":"pageMask"
			}).css({
				"background":"#000",
				"opacity":.4,
				"position":"absolute",
				"top":0,
				"left":-(fuzzWidth-980)/2,
				"z-index":11,
				"display":"none",
				"width":fuzzWidth,
				"height":fuzzHeight
			}).appendTo(jQuery('#holder'));
			
			$('#main-navigation > ul.shortcuts').superfish({ 
				delay:         1000,                          // one second delay on mouseout 
				animation:     {opacity:'show'},  			  // fade-in animation
				speed:         'fast',                        // faster animation speed 
				autoArrows:    false,                         // disable generation of arrow mark-up 
				dropShadows:   false,                         // disable drop shadows 
				onInit:        function(){},    // callback function fires once Superfish is initialised � 'this' is the containing ul 
				onBeforeShow:  function(){ 		// callback function fires just before reveal animation begins � 'this' is the ul about to open 
				},
				onShow:        function(){ 		// callback function fires once reveal animation completed � 'this' is the opened ul 
								$(this).addClass('activeMenu');
								$(this).parent().css('background-position', '0 -40px');
								$('#pageMask').css('opacity',.4);
								$('#pageMask').stop().fadeIn('fast');
								$('#main-navigation > ul.shortcuts > li.level1').not('.sfHover').css('background-position', '0 -80px');
								//$('#logo').css('opacity', '0.1');
				}, 
				onHide:        function(){ 		// callback function fires after a sub-menu has closed � 'this' is the ul that just closed 
								$(this).removeClass('activeMenu');
								$('#pageMask').stop().fadeOut('slow');
								$('#main-navigation > ul.shortcuts > li').css('background-position', '0 0px');
								
				} 
			}); 
			
			$('#main-visual-navigation ul.shortcuts li a').css('opacity', '0.7');
			

			// Font Size Controls
			$('#main-content').css('font-size', '1em'); // Setting it expicitly helps IE calculate :-)
			$('#main-content p').css('font-size', ''); // Emergency break for paragraphs with inline font-sizes
			
			var originalFontSize = $("#main-content").css("font-size");
			var originalFontSizeNumber = parseFloat(originalFontSize);
			
			// if exists load saved value, otherwise store it
			if($.cookie('mainFontSize')) {
				var $getSize = $.cookie('mainFontSize');
				$("#main-content").css('font-size', $getSize);
			}
			
			// Reset Font Size
			$(".resetFont").click(function(){
				$('#main-content').css('font-size', originalFontSize);
			});
			
			// Increase Font Size
			$(".increaseFont").click(function(){
				var fontSize = $('#main-content').css('font-size');
				var number = parseFloat(fontSize);
				var unit = fontSize.replace(number, "");
				var newNumber = number * 1.2;
				if (newNumber < originalFontSizeNumber * 2){
					var newFontSize = newNumber.toString() + unit;
					$('#main-content').css('font-size', newFontSize);
					$.cookie('mainFontSize', newFontSize);
				}
			});
			
			// Decrease Font Size
			$(".decreaseFont").click(function(){
				var fontSize = $('#main-content').css('font-size');
				var number = parseFloat(fontSize);
				var unit = fontSize.replace(number, "");
				var newNumber = number / 1.2;
				if (newNumber > originalFontSizeNumber / 2){
					var newFontSize = newNumber.toString() + unit;
					$('#main-content').css('font-size', newFontSize);
					$.cookie('mainFontSize', newFontSize);
				}
			});
			
			
			if(jQuery().cycle){
				jQuery('#best-rate #best-rate-content').cycle({ 
						fx:     'fade',  
						timeout: 5000,
						cleartypeNoBg: true
				});			
			}
			
			
		});
}catch(error){

}