$(document).ready(function(){
	$(".tooltip").tooltip({ 
    	bodyHandler: function() { 
        	return $($(this).attr("href")).html(); 
    	}, 
   		showURL: false 
	});
	$(".PlaatsUwBestelling").click(function(event){$("#LoadingBoxAfterOrder").show();});
	$('div.AfgerondeHoeken_WitMetGeleRand').wrap('<div class="AfgerondeHoeken_GeleRand"></div>');
	$('.AfgerondeHoeken_WitMetGeleRand').corner("round 8px").parent().css('padding', '1px').corner("round 10px");
	$('div.AfgerondeHoeken_WitMetZwarteRand').wrap('<div class="AfgerondeHoeken_ZwarteRand"></div>');
	$('.AfgerondeHoeken_WitMetZwarteRand').corner("round 8px").parent().css('padding', '1px').corner("round 10px");
	$('div.AfgerondeHoeken_WitMetGrijzeRand').wrap('<div class="AfgerondeHoeken_GrijzeRand"></div>');
	$('.AfgerondeHoeken_WitMetGrijzeRand').corner("round 8px").parent().css('padding', '1px').corner("round 10px");
	$(".overlayer").fancybox(); 
	$(".overlayeriframe").fancybox({'width': '80%','height': '80%','autoScale': false,'transitionIn': 'none','transitionOut': 'none','type': 'iframe'});
	var biggestHeight = 0;
	$('.equal_height').each(function(){if($(this).height() > biggestHeight){biggestHeight = $(this).height();} }); 
	$('.equal_height').height(biggestHeight);
			
$(document).ready(function(){

var MobileMinHeight = (($('.mobielcheckbox').height()+1))*3 + 25;
	$("#MobileDropDownLayer").css({'height' : MobileMinHeight + 'px'});
	$(".UitklappenDieHandel").click(function() {$("#MobileDropDownLayer").css({'height' : 'auto'});});
	$(".UitklappenDieHandel").click(function() {$(".UitklappenDieHandel").hide();});
	$(".UitklappenDieHandel").click(function() {$(".InklappenDieHandel").show();});
	$(".InklappenDieHandel").click(function() {$("#MobileDropDownLayer").css({'height' : MobileMinHeight + 'px'});});
	$(".InklappenDieHandel").click(function() {$(".InklappenDieHandel").hide();});
	$(".InklappenDieHandel").click(function() {$(".UitklappenDieHandel").show();});
	
	HideEveryThing();
	$("#PriceTagPosition").show();
	if ($("#MobileDetailRadioAbo_mob_080").is(':checked')) {
		RadioSelect_mob_080();
	}
	if ($("#MobileDetailRadioAbo_mob_090").is(':checked')) {
		RadioSelect_mob_090();
	}
	if ($("#MobileDetailRadioAbo_mob_100").is(':checked')) {
		RadioSelect_mob_100();
	}

	$("#MobileDetailRadioAbo_mob_080").click(function(){
		HideEveryThing();	
		RadioSelect_mob_080();
	});
	$("#MobileDetailRadioAbo_mob_090").click(function(){
		HideEveryThing();	
		RadioSelect_mob_090();
	});
	$("#MobileDetailRadioAbo_mob_100").click(function(){
		HideEveryThing();
		RadioSelect_mob_100();	
	});
	var varMobileOverviewGSMbottom = 32;
	var varMobileOverviewGSMbottom2 = 39;
	var varMobileOverviewGSMtop = 160;
	$('.MobileOverviewGSMbottom').each(function(){if($(this).height() > varMobileOverviewGSMbottom){varMobileOverviewGSMbottom = $(this).height();} }); 
	$('.MobileOverviewGSMtop').each(function(){if($(this).height() > varMobileOverviewGSMtop){varMobileOverviewGSMtop = $(this).height();} });
	$('#GSMVergelijkTabel .MobileOverviewGSMbottom').each(function(){if($(this).height() > varMobileOverviewGSMbottom2){varMobileOverviewGSMbottom2 = $(this).height();} }); 
	$('.MobileOverviewGSMbottom').height(varMobileOverviewGSMbottom);
	$('.MobileOverviewGSMtop').height(varMobileOverviewGSMtop);
	$('#GSMVergelijkTabel .MobileOverviewGSMbottom').height(varMobileOverviewGSMbottom2);

	var categoryid = getUrlVars()["category_id"];
    if (categoryid == 1){
    	$("#CatTabsTouch a").addClass('active');
    	$("#CatTop").addClass('TouchTop');
    	$("#CatMiddle").addClass('TouchMiddle');
    	$("#CatBottom").addClass('TouchBottom');
    }
    if (categoryid == 2){
    	$("#CatTabsMusic a").addClass('active');
    	$("#CatTop").addClass('MusicTop');
    	$("#CatMiddle").addClass('MusicMiddle');
    	$("#CatBottom").addClass('MusicBottom');
    }
    if (categoryid == 3){
    	$("#CatTabsClassic a").addClass('active');
    	$("#CatTop").addClass('ClassicTop');
    	$("#CatMiddle").addClass('ClassicMiddle');
    	$("#CatBottom").addClass('ClassicBottom');
    }
    if (categoryid == 4){
    	$("#CatTabsSmart a").addClass('active');
    	$("#CatTop").addClass('SmartTop');
    	$("#CatMiddle").addClass('SmartMiddle');
    	$("#CatBottom").addClass('SmartBottom');
    }
});
//end
});
	function HideEveryThing() {
		$("#MobileDetailPriceAbo_mob_080").hide();
		$("#MobileAboPriceTag_mob_080").removeClass("YellowTag").addClass("GreyTag");
		$("#MobileDetailPriceAbo_mob_090").hide();
		$("#MobileAboPriceTag_mob_090").removeClass("YellowTag").addClass("GreyTag");
		$("#MobileDetailPriceAbo_mob_100").hide();
		$("#MobileAboPriceTag_mob_100").removeClass("YellowTag").addClass("GreyTag");
		//$("#MobileDetailAboText_mob_080").hide();
		//$("#MobileDetailAboText_mob_090").hide();
		//$("#MobileDetailAboText_mob_100").hide();
	}
	function RadioSelect_mob_080() {		
		$("#MobileDetailPriceAbo_mob_080").show();
		$("#MobileDetailPriceAbo_mob_080").removeClass("BoxPriceTag").addClass("BoxPriceTag02");
		setTimeout(function() { $("#MobileDetailPriceAbo_mob_080").removeClass("BoxPriceTag02").addClass("BoxPriceTag"); }, 1500);
		$("#MobileAboPriceTag_mob_080").removeClass("GreyTag").addClass("YellowTag");
		//$("#MobileDetailAboText_mob_080").show();
	}
	function RadioSelect_mob_090() {
		$("#MobileDetailPriceAbo_mob_090").show();
		$("#MobileDetailPriceAbo_mob_090").removeClass("BoxPriceTag").addClass("BoxPriceTag02");
		setTimeout(function() { $("#MobileDetailPriceAbo_mob_090").removeClass("BoxPriceTag02").addClass("BoxPriceTag"); }, 1500);
		$("#MobileAboPriceTag_mob_090").removeClass("GreyTag").addClass("YellowTag");
		//$("#MobileDetailAboText_mob_090").show();
	}
	function RadioSelect_mob_100() {
		$("#MobileDetailPriceAbo_mob_100").show();
		$("#MobileDetailPriceAbo_mob_100").removeClass("BoxPriceTag").addClass("BoxPriceTag02");
		setTimeout(function() { $("#MobileDetailPriceAbo_mob_100").removeClass("BoxPriceTag02").addClass("BoxPriceTag"); }, 1500);
		$("#MobileAboPriceTag_mob_100").removeClass("GreyTag").addClass("YellowTag");
		//$("#MobileDetailAboText_mob_100").show();
	}
    function  getUrlVars() {
        var vars = {};
    	var parts = window.location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi, function(m,key,value) {
        	vars[key] = value;
    	});
    	return vars;
	}
