$(document).ready(function(){

// Navigering -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

	var oNav;
	var arrRolldown;

	// Dropdown
	$("#nav li").hoverIntent(function() { $(this).find("ul").css("display","block"); }, function() { $(this).find("ul").css("display","none"); });

	// Dropdownlänkning
	$("#nav ul li").click(function() { document.location = $(this).find("a:first")[0]; });

	// Subnav submeny
	$("#subNav ul").parent().find("a:first").click(function(e){ $(this).parent().find("ul").toggle(); e.preventDefault(); });
	
	// Rensa sökruta
	$("#ctl00_ContentPlaceHolderMain_search1_tbSearch").click(function(e) { this.value = ""; });

	// Rensa sökruta
	$("li.retailer").click(function(e) { document.location = $(this).find("a:first")[0]; });

	// Bildspel, kollektion
	$('#collectionSlide').cycle({
        fx:     'fade',
        timeout: 5000,
        pager:  '#collectionSlideThumb',
		pagerAnchorBuilder: function(idx, slide) { return '#collectionSlideThumb li:eq(' + idx + ') a'; }
    });
	
});

function flash(strFile, strId, strClass, intWidth, intHeight) {
    document.write("<object class=\"" + strClass + "\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0\" name=\"" + strId + "\" width=\"" + intWidth + "\" height=\"" + intHeight + "\" id=\"" + strId + "\">");
    document.write("<param name=\"movie\" value=\"" + strFile + "\" />");
    document.write("<param name=\"quality\" value=\"high\" />");
    document.write("<param name=\"wmode\" value=\"transparent\">");
    document.write("<param name=\"SCALE\" value=\"exactfit\">");
    document.write("<param name=\"menu\" value=\"false\">");
    document.write("<embed class=\"" + strClass + "\" src=\"" + strFile + "\" width=\"" + intWidth + "\" height=\"" + intHeight + "\" quality=\"high\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" type=\"application/x-shockwave-flash\" wmode=\"transparent\" scale=\"exactfit\" menu=\"false\" name=\"" + strId + "\"></embed></object>");
}