
//-- STARTUP CODE ------
$(document).ready(function(){


	// Rounded corners on menu box
	// $("#wrapper_header_menu_content").append("<div class='corner_br'><\/div>").append("<div class='corner_bl'><\/div>").append("<div class='corner_tr'><\/div>").append("<div class='corner_tl'><\/div>");
				


	// Back to index, anyone?
	/*$("#logo").css('cursor', 'pointer').click( function(){
		window.location.href="/";
	});
	*/


	// Panelerna till vŠnster
	$('.my_slide').slidePanel({role:'accordion'});
				


	//---[ PARTNERS I - START SLIDE SHOW ]---------------------------------------------------------------------------
	$('#slideshow_p1').cycle({ 
		 fx: 'fade',
		 pause: 0,
		 timeout: 4000,
		 speed: 2200,
		 delay: -2000, 	// additional delay (in ms) for first transition (hint: can be negative) 
		 nowrap:	0
		 //autostop:	1,
		 //autostopCount:Ê5
		 
	});
	
	
	//---[ PARTNERS II - START SLIDE SHOW ]---------------------------------------------------------------------------
	$('#slideshow_p2').cycle({ 
		 fx: 'fade',
		 pause: 0,
		 timeout: 4000,
		 speed: 2200,
		 delay: -2000, 	// additional delay (in ms) for first transition (hint: can be negative) 
		 nowrap:	0
		 //autostop:	1,
		 //autostopCount:Ê5
		 
	});
	
	//---[ PARTNERS III - START SLIDE SHOW ]---------------------------------------------------------------------------
	$('#slideshow_p3').cycle({ 
		 fx: 'fade',
		 pause: 0,
		 timeout: 4000,
		 speed: 2200,
		 delay: -2000, 	// additional delay (in ms) for first transition (hint: can be negative) 
		 nowrap:	0
		 //autostop:	1,
		 //autostopCount:Ê5
		 
	});	
	

	//---[ LIGHTBOX - SEPARAT F…R V€NSTER SPALT ]---------------------------------------------------------------------------
	$('a.lightbox_senaste').lightBox({
		overlayBgColor: '#000',
		overlayOpacity: 0.8,
		imageLoading: system_url + 'javascript/jquery/lightbox/images/lightbox-ico-loading.gif',
		//imageBtnClose: system_url + 'javascript/jquery/lightbox/images/lightbox-btn-close.gif',
		imageBtnPrev: system_url + 'javascript/jquery/lightbox/images/lightbox-btn-prev.gif',
		imageBtnNext: system_url + 'javascript/jquery/lightbox/images/lightbox-btn-next.gif',
		containerResizeSpeed: 350,
		txtImage: 'Bild',
		txtOf: 'av'
	});			
				
				
				
				
	// Start this sites menu system
	jQuery(function(){
		jQuery('ul.sf-menu').superfish({ 
			delay:       800,                            // one second delay on mouseout 
			animation:   {opacity:'show',height:'show'},  // fade-in and slide-down animation 
			speed:       500, 		                      // faster animation speed 
			autoArrows:  false,                           // disable generation of arrow mark-up 
			dropShadows: false                            // disable drop shadows 
		});
	});
	
	
	
	
	
	
	
	//---[ SHOW_MOVIE_CLIP ]---------------------------------------------------------------------------
	$('a.show_movie_clip').click(function ( e ) {
			e.preventDefault();
			
			//alert("Hello!");
			
			var dialog_box = $('<div id="" class="jqmWindow" style="" ><\/div>');

			//var movie_clip = $('<p>Clip to: ' + $(this).attr('href') + '<\/p>');
			
			var data = "";
			var path = $(this).attr('href');
			/*
			<div class='movie_box'><\/div>
			*/
//			var movie_clip = $("<a class='flowplay' data='{ clip: { autoPlay:	false, scaling: \"orig\" }	}' href='" + path + "' ><img src='/grafik/bg_flowplayer.jpg' /><\/a>"); 

			var movie_clip = $("<a class='flowplay' data='{ clip: { autoPlay:	true, scaling: \"orig\" }	}' href='" + path + "' ><\/a>"); 
			
			$(dialog_box).append(movie_clip);
			$(dialog_box).prependTo('body').jqm({overlay: 90}).jqmShow();
			
			$('.flowplay').flowplay();
	
	});
	
	



});