function AllCards() {
	
	this.init = function() {
		this.initJumpList();
		showcase.initFisheye();
		showcase.initCardOverflowButtons();
		showcase.finderFilterInit();
		showcase.initCardHover();
		this.initClickSubFilters();
		this.doSIFR();
	}
	
	this.unInit = function() {
		showcase.unInitFisheye();
	}
	
	this.initJumpList = function() {
		$('#btn-apply-card').click(function() {
			var sel = document.getElementById('select-apply-card');
			var href = sel.options[sel.selectedIndex].value;
			if (href.length > 0) {
				window.location = href;
			}
		});
	}
	
	/**
	* Initialises the extra functionality when the sub filters are clicked
	*
	*/
	this.initClickSubFilters = function () {
		$('.allcardsFilter').click(function() {
			allcards.subFilterClick($(this));
		});
	}
	
	/**
	* This function is called when the subfilters are clicked
	*
	*/
	this.subFilterClick = function(object) {
		$('.allcardsFilter').css('background-position','100% 0px');
		$('.allcardsFilter').children().css('background-position','0px 0px');
		object.css('background-position','100% -28px');
		object.children().css('background-position','0px -28px');  
	}
	
	
	this.doSIFR = function()  {
		if (typeof sIFR == "function") {
			
			// check for noSIFR flag
			if ($('#content').hasClass('noSIFR') == 1) return;
			
			// sIFR wMode causes strange layout issues, so read current color styles to apply to sIFR
			// define templates
			var strapline1 = named({
				sFlashSrc:	"/cards/intlbrochure/flash/AgendaLt.swf",
				sColor:		rgb2hex($('#strapline1 h2').css('color')),
				sBgColor:	rgb2hex($('#strapline1 h2').css('background-color')),
				sCase:		"upper",
				sFlashVars:	"textalign=center"
			});
			var strapline2 = named({
				sFlashSrc:	"/cards/intlbrochure/flash/AgendaLt.swf",
				sColor:		rgb2hex($('#strapline2 h2').css('color')),
				sBgColor:	rgb2hex($('#strapline2 h2').css('background-color')),
				sCase:		"upper",
				sFlashVars:	"textalign=center"
			});
			
			var applyHeading = named({
				sFlashSrc:	"/cards/intlbrochure/flash/AgendaLt.swf",
				sColor:		rgb2hex($('.leftColumn h3').css('color')),
				sWmode: "transparent",
				sFlashVars:	"textalign=left"
			});

			var helpHeading = named({
				sFlashSrc:	"/cards/intlbrochure/flash/AgendaLt.swf",
				sColor:		rgb2hex($('.rightColumn h3').css('color')),
				sWmode: "transparent",
				sFlashVars:	"textalign=left"
			});

			var filterBy = named({
				sFlashSrc:	"/cards/intlbrochure/flash/AgendaLt.swf",
				sColor:		rgb2hex($('#filterBy h3').css('color')),
				sBgColor:	rgb2hex($('#filterBy h3').css('background-color')),
				sFlashVars:	"textalign=left"
			});
			//textalign=center in FlashVars is causing problems with 'low graphic' stylesheet (css/light/light.css)
	
			// replace elements
			sIFR.replaceElement('#strapline1 h2', strapline1);
			sIFR.replaceElement('#strapline2 h2', strapline2);
			sIFR.replaceElement('.leftColumn h3', applyHeading);
			sIFR.replaceElement('.rightColumn h3', helpHeading);
			sIFR.replaceElement('#filterBy h3', filterBy);
		};
	}
}


$(document).ready(function(){
	showcase = new Showcase();
	allcards = new AllCards(showcase);
	allcards.init();
});



function cardSelectde(){

if(document.getElementById('select-apply-card').selectedIndex==0){
  alert("Bitte \344hlen Sie eine Karte aus");
   
}else{

window.location=document.getElementById('select-apply-card').options[document.getElementById('select-apply-card').selectedIndex].value;
}

}



function cardSelect(){

if(document.getElementById('select-apply-card').selectedIndex!=0){

window.location=document.getElementById('select-apply-card').options[document.getElementById('select-apply-card').selectedIndex].value;

}

}

