$(function() {

	$('#featured').cycle({
			timeout: 7000,
			next: '#featuredNext',
			prev: '#featuredPrev',
			pager: '#featuredNav',
			pause: 1,
			fx:     'fade'
		});


});
function getAddonInfo(pId) {
    ret = GoTo.GoLondonService.GetAddonDescription(pId, getAddonOnSuccess, getAddonOnFail, null);
    return false;
}
function getAddonOnSuccess(args) {
    $('#addon_text').html(args);
    $('#addon_info').show('slow');
}
function getAddonOnFail() {
    $('#addon_text').html('Ingen tilleggsinformasjon');
    $('#addon_info').show('slow');
}
function Clickheretoprint() {
    var disp_setting = "toolbar=yes,location=no,directories=yes,menubar=yes,";
    disp_setting += "scrollbars=yes,width=650, height=600, left=100, top=25";
    var content_vlue = document.getElementById("print_content").innerHTML;

    var docprint = window.open("", "", disp_setting);
    docprint.document.open();
    docprint.document.write('<html><head><title>Tips www.golondon.no, www.goeuropa.no, www.gobremen.no, www.goalicante.no, www.goedinburgh.no</title>');
    docprint.document.write('<link href="http://golondon.no/App_Themes/Default/Admin.css" type="text/css" rel="stylesheet" /><link href="http://golondon.no/App_Themes/Default/Default.css" type="text/css" rel="stylesheet" /><link href="http://golondon.no/App_Themes/Default/star_rating.css" type="text/css" rel="stylesheet" /><link href="http://golondon.no/css/prettyPhoto.css" type="text/css" rel="stylesheet" />');
    docprint.document.write('</head><body style="background-color:#fff; font-size:9px;" onLoad="self.print()">');
    docprint.document.write(content_vlue);
    docprint.document.write('</body></html>');
    docprint.document.close();
    docprint.focus();
}
function addzero(value) {
    while (value.length < 2) value = String("0") + value;
    return value;
}
function checkName() {
    if ($('newlocation').style.display != 'none') {
        if ($('ctl00_ContentPlaceHolder1_txtNewLocation').value == '') {
            alert('Du må fylle ut navn');
            return false;
        }
    }
}

function checkDateOrder(frm, ci_day, ci_month_year, co_day, co_month_year) {
    if (document.getElementById) {
        var frm = document.getElementById(frm);
        // create date object from checkin values
        // set date to 12:00 to avoid problems with one
        // date being wintertime and the other summertime
        var checkin_day = document.getElementById('b_checkin_day');
        var checkin_month = document.getElementById('b_checkin_month');
        var checkout_day = document.getElementById('b_checkout_day');
        var checkout_month = document.getElementById('b_checkout_month');

        var my = checkin_month.value.split("-");
        var ci = new Date(my[0], my[1] - 1, checkin_day.value, 12, 0, 0, 0);

        // create date object from checkout values
        my = checkout_month.value.split("-");
        var co = new Date(my[0], my[1] - 1, checkout_day.value, 12, 0, 0, 0);

        // if checkin date is at or after checkout date,
        // add a day full of milliseconds, and set the
        // selectbox values for checkout date to new value
        if (ci >= co) {
            co.setTime(ci.getTime() + 1000 * 60 * 60 * 24);
            checkout_day.value = co.getDate();
            var com = co.getMonth() + 1;
            checkout_month.value = co.getFullYear() + "-" + com;
        }
    }
}
jQuery(document).ready(function () {
    jQuery(".prod_desc").hide();
    //toggle the componenet with class msg_body
    jQuery(".prod_readmore").click(function () {
        jQuery(this).next(".prod_desc").slideToggle(500);
        jQuery(this).hide();
    });
});
