/*
	
	Italy Tours Global Javascript Functions
	By  - ISITE Design

*/

// jquery no conflict. use $j or jQuery outside of ready function
var $j = jQuery.noConflict(); 


// jQuery document ready
jQuery(function($) {

	// JS enabled
	$("html").sniff();
	
	// Few setups for IE6
	if(document.all){
		//add class to drop downs and buttons 
	    $('#nav li, button').hover(
			function() { $(this).addClass('over'); },
			function() { $(this).removeClass('over'); }
	    );
	}// if document.all

});// document ready


// application logic


// jQuery plugins
jQuery.fn.sniff=function(s){var snuff,platform,v=function(s){var ua=navigator.userAgent.toLowerCase();ua=ua.substring(ua.indexOf(s+'/')+(s.length+1));return ua.substring(0,1)};jQuery.browser.chrome=/chrome/.test(navigator.userAgent.toLowerCase());if(jQuery.browser.msie){snuff="ie ie"+jQuery.browser.version.substring(0,1)}else if(jQuery.browser.mozilla){if(navigator.userAgent.toLowerCase().indexOf('firefox')!=-1){var temp=v("firefox")==3&&!!document.createElement('video').canPlayType?"3-5":v("firefox");snuff="ff ff"+temp}else{snuff="mz"}}else if(jQuery.browser.chrome){snuff="ch ch"+v("chrome");jQuery.browser.safari=false}else if(jQuery.browser.safari){snuff="sf sf"+v("version")}else if(jQuery.browser.opera){snuff="op"}if(navigator.platform.indexOf("Win")!=-1){platform="windows"}else if(navigator.platform.indexOf("Mac")!=-1){platform="mac"}else if(navigator.platform.indexOf("Linux")!=-1){platform="linux"}return this.each(function(){jQuery(this).addClass("js "+platform+" "+snuff)})};

// etc

// clean console.log
function cl(){ if(window.console&&window.console.firebug) { var args = [].splice.call(arguments,0); console.log(args.join(" ")); } }//cl()
// example: cl("If you use cl() instead of console.log(), it won't break IE when you forget to take it out.");


// IE6 fixes
// make sure IE has the abbr and acronym tag
if(document.all){
	document.createElement("abbr");
	document.createElement("acronym");
}
// prevent IE6 flicker
try { document.execCommand('BackgroundImageCache', false, true); } catch(e) {}
