/*
 * Couponmonkey // Main JS
 * 
 * This file contains all required functions and configurations
 * for the Couponmonkey website.
 *
 * Copyright 2008 Stefan Heckler
 * 
 * @author: Stefan Heckler
 * @version: $Id: cm.js 29 2008-10-26 02:06:20Z sh $
 */

// general configuration
var cmConfig = new Array();
	
	// url definitions
	cmConfig['baseurl'] = '/';
	cmConfig['mediaurl'] = cmConfig['baseurl']+'media/';
 

/*
 * cufón configuration
 * 
 * We replace all h1 and h2 tags on the website with "Georgia Italic"
 * h1-Element on rootpage has various fontsize
 */

Cufon.replace('.MainFooter h3, .HomeTeaser h2, .HomeTeaser em, .HomeTeaserSearchText, .ContentBox h2, .ContentBox h1, .HomeText h3');

function showPopdown()
{
    window.open('/newsletter_popdown.php', 'Meingutscheincode.de Newsletter', 'width=350,height=350,resizable=false');
}


$(document).ready(function(){
    window.onBlur = window.focus();
    // input reset function
    $('.HomeTeaserSearchInput, .QuickSearch input[type="text"]').focus(function(){
        $(this).val('');
    });

    $('.RedeemVoucher').click(function(){
    	pageTracker._trackPageview("/success");
       var id = $(this).attr('id');
       $(this).hide();
       $('#code_'+id).show().select();

       var win = window.open($(this).attr('href'), '_blank', 'toolbar=1,location=1,directories=1,status=1,menubar=1,scrollbars=1,resizable=1');
       win.blur();

       return false;
    });



});

