$(document).ready(function(){
	if($("a.player").length){
	//Flowplayer js
    flowplayer("a.player", "../js/flowplayer/flowplayer-3.2.0.swf", {
        clip: {
            autoPlay: true
        },
        plugins: {
            controls: {
                autoHide: 'always',
                hideDelay: 2000
            },
			gatracker: {
			url: "../js/flowplayer/flowplayer.analytics-3.2.0.swf",
			trackingMode: "Bridge"
		}
        }
    });
	}

	//Tabs js
    // setup ul.tabs to work as tabs for each div directly under div.panes 
    $("ul.tabs").tabs("#panes > div",{effect:'fade',
	fadeOutSpeed: 400});

	//Header nav js
	$("#header-top-nav li").hover(function(){
	$(this).find("span").show();
	//return false;
	},
	function(){
	$(this).find("span").fadeOut();
		//return false;
	}
	);
	
	//jQuery slide down menu
	$('#nav li').hover(
		function () {
			//show its submenu
			$('ul', this).slideDown(100);

		}, 
		function () {
			//hide its submenu
			$('ul', this).slideUp(100);			
		}
	);
	
	//jQuery to center image
	$("a.player img").css("margin-top", $("a.player img").parent().height()/2-40).show();
	
	
	//jQuery Tools modal dialog trigger
	var trigger = $(".modal").overlay({

	// some mask tweaks suitable for modal dialogs
	mask: {
		color: '#ffffff',
		loadSpeed: 200,
		opacity: 0.9
	},
	onClose:function(){
		$f().show();
		},
	closeOnClick: true,
	top:"center"
	});	

	$("img.guarantee").click(function(){
		$f().hide();
		trigger.overlay().load();
	});
	
	$("a.show-me").click(function(){
		$(this).next().slideDown();
		return false;
	});
});

$(window).load(function() {	
		if($("div.quote").length){
			       $("div.quote").liquidCanvas(
"[ fill{color:#EAEAEA;} ] => roundedRect{radius:10}");	
		}     
});
    

