﻿$(document).ready(function () {
    //Examples of how to assign the ColorBox event to elements
    //$(".myaddressbook").live('colorbox',{ transition: "none", iframe: true, innerWidth: 1000, innerHeight: 600 });
    $(".mylostpassword").colorbox({ transition: "none", iframe: true, innerWidth: 450, innerHeight: 175 });
    $(".downloadimg").colorbox({ transition: "none", iframe: false, innerWidth: 800, innerHeight: 600 });
    $(".downloadlink").colorbox({ transition: "none", iframe: true, innerWidth: 1000, innerHeight: 650 });
    $(".mylink").colorbox({ transition: "none", iframe: true, innerWidth: 1000, innerHeight: 650 });
    $(".myaddressbook").live('click', function () {
        // this is the url of the element event is triggered from  
        var strurl = $(this).attr("href");
        $.fn.colorbox({ href: strurl, transition: "none", iframe: true, innerWidth: 1000, innerHeight: 600 });
        return false;
    });

    $(".svlink").live('click', function () {
        // this is the url of the element event is triggered from  
        var strurl = $(this).attr("href");
        $.fn.colorbox({ href: strurl, transition: "none", iframe: true, innerWidth: 1000, innerHeight: 650 });
        return false;
    });


    $(".mypaketschein").live('click', function () {
        // this is the url of the element event is triggered from  
        var strurl = $(this).attr("href");
        $.fn.colorbox({ href: strurl, transition: "none", iframe: true, innerWidth: 1000, innerHeight: 685 });
        return false;
    });

    $(".myupload").live('click', function () {
        // this is the url of the element event is triggered from  
        var strurl = $(this).attr("href");
        $.fn.colorbox({ href: strurl, transition: "none", iframe: true, innerWidth: 300, innerHeight: 130 });
        return false;
    });

    $(".myVorschau").live('click', function () {
        // this is the url of the element event is triggered from  
        var strurl = $(this).attr("href");
        $.fn.colorbox({ href: strurl, transition: "none", iframe: true, innerWidth: 1000, innerHeight: 685 });
        return false;
      });

      $(".myPrintPreview").live('click', function () {
        // this is the url of the element event is triggered from  
        var strurl = $(this).attr("href");
        $.fn.colorbox({ href: strurl, transition: "none", iframe: true, innerWidth: 474, innerHeight: 695 });
        return false;
      });

      $(".mymap").live('click', function () {
        // this is the url of the element event is triggered from  
        var strurl = $(this).attr("href");
        $.fn.colorbox({ href: strurl, transition: "none", iframe: true, innerWidth: 1000, innerHeight: 650 });
        return false;
      });



});



function checkcashspecial(arg1) {

    if (arg1.checked == false) {
        return false;
    }
	var answer = confirm("Beim Aktivieren des Zusatzservice werden die Pakete als Einzelsendung verschickt. Eine gleichzeitige Zustellung ist hier nicht mehr gewährleistet. Wollen Sie trotzdem fortfahren?");
	if (answer){
	    arg1.checked = true;
	}
	else{
	    arg1.checked = false;
	}
}
