/* Desiwear.com Homepage AD Handler - Written by Suntra.ca */

// disbaled slider for SIK 
// January 26 2011
function loadAds(adblock) {

	jQuery("#dw_adblock .ad_container").load("ads/adbloc"+adblock+"/template.html",function(){	
	jQuery('#'+adblock).addClass("active").removeClass("notactive");
	for(var i = 0; i <= jQuery('.dw_adnav a').length; i++) {
	if (i != adblock) { jQuery('#'+i).removeClass("active").addClass("notactive"); } }
	jQuery('.ad_img').imghover();
	}).hide().fadeIn('slow');	
}

function nextAd() {
	c = parseInt(jQuery('.active').attr('id'));	
	t = jQuery('.dw_adnav a').length; //total blocks
	if (c >= t) { c = 0;}
	loadAds(c+1);
}
var adtimer = 0;
function adsetTimer() {
	adtimer = setInterval(function()  { nextAd() }, 61000);
}
jQuery(document).ready(function() { 
	loadAds(1); 
adsetTimer(); 
	jQuery("#dw_ad").mouseover(function(){
clearInterval(adtimer);
	    }).mouseout(function(){
	   	adsetTimer();
	    });
	});
	
	function adLink(url) {
//	pageTracker._trackPageview(location.href+url);
	window.location = location.href+url;
	}

	
