jQuery.noConflict();

jQuery(document).ready(function(){


// -------------------------------------------------------------------------------------------
// START EDITING HERE
// -------------------------------------------------------------------------------------------


	// activates the lightbox page
	my_lightbox("a[rel^='prettyPhoto'], a[rel^='lightbox']",true);
	
	// font replacement, remove this line if you want to use a different font defined in css, 
	// or if the current font doesnt support some of your language specific characters
	
	k_menu(); // controls the dropdown menu
	

	/*Embedded Videos*/
	var url = jQuery("meta[name=temp_url]").attr('content');
	flowplayer(".videoplayer", {src: templateUrl + "/flashplayer/flowplayer-3.1.5.swf", wmode: "transparent", cachebusting: jQuery.browser.msie}, { // "videoplayer" is the class the player gets applied to
		clip: {  
	        autoPlay: true,
	        autoBuffering: true 
	    },
	   
		plugins: 
		{ 
			controls: 
			{ 
				// display properties 
		        backgroundColor: '#333333', 
		        backgroundGradient: 'none', 
		        sliderColor: '#111111',
		        progressColor: '#ffffff', 
  				bufferColor: '#aaaaaa', 
		 
		        // controlbar-specific configuration 
		        fontColor: '#ffffff',
		        timeFontColor: '#333333', 
		        autoHide: 'always' 
	        }
	        
	        ,controls: null //remove this line if you want to show controls
		}
	});
	
	
// -------------------------------------------------------------------------------------------
// END EDITING HERE
// -------------------------------------------------------------------------------------------		
});


function k_menu()
{
	// k_menu controlls the dropdown menus and improves them with javascript
	
	jQuery("#navigation a").removeAttr('title');
	jQuery(" navigation ul ul ").css({display: "none"}); // Opera Fix

	
	//smooth drop downs
	jQuery("#navigation li").each(function()
	{	
		
		var $sublist = jQuery(this).find('ul:first');
		
		jQuery(this).hover(function()
		{	
			$sublist.stop().css({overflow:"hidden", height:"auto", display:"none", paddingTop:30}).slideDown(200, function()
			{
				jQuery(this).css({overflow:"visible", height:"auto"});
			});	
		},
		function()
		{	
			$sublist.stop().slideUp(200, function()
			{	
				jQuery(this).css({overflow:"hidden", display:"none"});
			});
		});	
	});
}


function my_lightbox($elements, autolink)
{	
	var theme_selected = 'light_square';
	
	jQuery($elements).prettyPhoto({
			"theme": theme_selected /* light_rounded / dark_rounded / light_square / dark_square */});
	
	jQuery($elements).each(function()
	{	
		var $image = jQuery(this).contents("img");

	});	
}
