// no-conflict
jQuery.noConflict();

// on body load
jQuery(document).ready(function(){

	// link på menupunkt med butiksoversigt
	jQuery('.mainmenu a[href="/Butikker/Butiksoversigt.aspx"]').attr('href','#').attr('onclick','vis_butiksoversigt();');
		
		// cufon
 Cufon.replace('.bundbanner_blaa_overskrift h3'); 
 Cufon.replace('.banner2'); 

	// blok med tilmelding til nyhedsbrev
 jQuery('#AccessUserName_12').attr('value','Indtast navn');
 jQuery('#AccessUserEmail_12').attr('value','Indtast e-mail');
 
 // focus + blur for blok med nyhedsbrev
 jQuery('#AccessUserName_12').focus(function(){
  if(jQuery('#AccessUserName_12').val() == 'Indtast navn') jQuery('#AccessUserName_12').val('');
 });
 jQuery('#AccessUserName_12').blur(function(){
  if(jQuery('#AccessUserName_12').val() == '') jQuery('#AccessUserName_12').val('Indtast navn');
 });
 jQuery('#AccessUserEmail_12').focus(function(){
  if(jQuery('#AccessUserEmail_12').val() == 'Indtast e-mail') jQuery('#AccessUserEmail_12').val('');
 });
 jQuery('#AccessUserEmail_12').blur(function(){
  if(jQuery('#AccessUserEmail_12').val() == '') jQuery('#AccessUserEmail_12').val('Indtast e-mail');
 });
 
 // mouseovers på aktiviteter og butiksnyheder
 jQuery('.brand-detail').hover(function(){ // 
  jQuery(this).stop(1,1).animate({ backgroundColor: '#DAF3F8' }, 750);
	}, function(){
  jQuery(this).stop(1,1).animate({ backgroundColor: '#FFFFFF'}, 500);
	});
 
 // mouseovers på bannere i bunden
 jQuery('.banner1, .banner2, .banner3, .blue-banner1, .blue-banner2, .blue-banner3').hover(function(){ // 
  jQuery(this).stop(1,1).animate({ opacity:0.65 }, 500);
	}, function(){
  jQuery(this).stop(1,1).animate({ opacity:1.00 }, 350);
	});
 
 // tilføjer wmode på forside-flashbanner
 // jQuery('#flashbanner embed').attr('wmode','transparent');
 
 // dropdown menuen
 jQuery('ul.sf-menu').superfish({ 
  delay:200,
  animation:{opacity:'show',height:'show'},
  speed:'normal',
  autoArrows:false,
  dropShadows:false 
 });
     
});

// funktion til butiksoversigt
function vis_butiksoversigt(){
 window.open('http://www.esbjergstorcenter.dk/Files/System/esc/oversigtskortv2.html?purge=true&refresh=yes','Oversigt','resizable=no,location=no,menubar=no,scrollbars=yes,status=no,toolbar=no,fullscreen=no,dependent=no,width=870,height=1213,status');
 // window.open('http://www.esbjergstorcenter.dk/Files/System/esc/oversigtskort.html','Oversigt','resizable=no,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,fullscreen=no,dependent=no,width=770,height=396,status');
 // window.open('http://www.esbjergstorcenter.dk/Files/System/esc/oversigtskort.html','Oversigt','resizable=no,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,fullscreen=no,dependent=no,width=1000,height=506,status');
}

// funktion til at aabne webradioen i mini-popup
function webradio(){
 window.open('http://www.esbjergstorcenter.dk/Files/System/esc/webradio/player.html','WebRadio','width=350,height=150');
}