/*! * jQuery Cookie Plugin v1.3.1 * https://github.com/carhartl/jquery-cookie * * Copyright 2013 Klaus Hartl * Released under the MIT license */ (function (factory) { if (typeof define === 'function' && define.amd) { // AMD. Register as anonymous module. define(['jquery'], factory); } else { // Browser globals. factory(jQuery); } }(function ($) { var pluses = /\+/g; function raw(s) { return s; } function decoded(s) { return decodeURIComponent(s.replace(pluses, ' ')); } function converted(s) { if (s.indexOf('"') === 0) { // This is a quoted cookie as according to RFC2068, unescape s = s.slice(1, -1).replace(/\\"/g, '"').replace(/\\\\/g, '\\'); } try { return config.json ? JSON.parse(s) : s; } catch(er) {} } var config = $.cookie = function (key, value, options) { // write if (value !== undefined) { options = $.extend({}, config.defaults, options); if (typeof options.expires === 'number') { var days = options.expires, t = options.expires = new Date(); t.setDate(t.getDate() + days); } value = config.json ? JSON.stringify(value) : String(value); return (document.cookie = [ config.raw ? key : encodeURIComponent(key), '=', config.raw ? value : encodeURIComponent(value), options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE options.path ? '; path=' + options.path : '', options.domain ? '; domain=' + options.domain : '', options.secure ? '; secure' : '' ].join('')); } // read var decode = config.raw ? raw : decoded; var cookies = document.cookie.split('; '); var result = key ? undefined : {}; for (var i = 0, l = cookies.length; i < l; i++) { var parts = cookies[i].split('='); var name = decode(parts.shift()); var cookie = decode(parts.join('=')); if (key && key === name) { result = converted(cookie); break; } if (!key) { result[name] = converted(cookie); } } return result; }; config.defaults = {}; $.removeCookie = function (key, options) { if ($.cookie(key) !== undefined) { $.cookie(key, '', $.extend(options, { expires: -1 })); return true; } return false; }; })); var dialogTimerID = false; var dialogHeight = 0; var dialogTimerCount = 0; function openDialog(title, html) { $('body').append('
'); // Resize to Viewport $("#greyBox").css( 'width', jQuery(window).width() +'px', 'height', jQuery(window).height() +'px' ); $('body').append('

'+ title +'

Schließen [X]
'+ html +'
'); dialogHeight = $("#dialog").height(); checkHeightTimer(); $("#flashuploader").css("visibility", "hidden"); $("#dialog").keypress(function(e) { if(e.keyCode === 27) closeDialog(); }); // Make the Dialog visible $("#dialog").css("display", "block"); centerDialogIntoViewport(); } function closeDialog() { if (dialogTimerID != false) { clearTimeout(dialogTimerID); dialogTimerID = false; dialogTimerCount = 0; dialogHeight = 0; } $("#greyBox").remove(); $("#dialog").remove(); if(window.opera) { $("body").css("background", "#80b7ff url('/res/imgs/gradient.jpg') repeat-x"); } $("#flashuploader").css("visibility", "visible"); } function resizeDialog(width) { if (width) { $("#dialog").css("width", width + "px"); } centerDialogIntoViewport(); } function php_htmlentities(str) { return str.replace(/"/g, '"').replace(//g, '>'); } function confirmDialog(html, url, postIt) { var dialogOnClick = "window.setTimeout(function() { $('#dialog').html('Bitte warten...') }, 100);"; if(typeof(postIt) != 'undefined') { dialogOnClick = dialogOnClick + "$.post('" + url + "', '" + postIt.replace(/'/g, "\\'") + "', function() { document.location.href = '" + url + "'; } );"; } else { dialogOnClick = dialogOnClick + "document.location.href = '" + url + "';"; } openDialog('Bestätigung', html + ''); resizeDialog(500); } function checkHeightTimer() { if($('#dialog').height() != dialogHeight){ resizeDialog(); clearTimeout(dialogTimerID); dialogTimerID = false; dialogTimerCount = 0; dialogHeight = 0; // console.log('resized after loading: '+ dialogTimerCount); return; } if (dialogTimerCount >= 30) { clearTimeout(dialogTimerID); dialogTimerID = false; dialogTimerCount = 0; dialogHeight = 0; // console.log('Max try reached: '+ dialogTimerCount); return; } dialogTimerCount ++; dialogTimerID = setTimeout(checkHeightTimer, 100); } function centerDialogIntoViewport () { // Re-Center into Viewport $("#dialog").css('top', parseInt(($(window).height() - $("#dialog").height()) / 2) + $(window).scrollTop() - 20 + 'px' ); $("#dialog").css('left', parseInt(($(window).width() - $("#dialog").width()) / 2) +'px' ); } function linkDialog(img) { openDialog('Links', '

Weißt du nicht, welchen Link/Code du benutzen musst? Klicke hier.

'); resizeDialog(700); $("#links").load('/calls/getLinks.php?img=' + img); } function checkResize() { if(forceFull == false) { $("#layerright").show(); $("#iphpbannerleft").show(); if($("#layerright").length == 1) { $("#layerright").css("right", "-190px"); $("#content").css("margin-right", "190px"); } if($("#iphpbannerleft").length == 1) { $("#iphpbannerleft").css("left", "-190px"); $("#content").css("margin-left", "190px"); } $("body").css("text-align", "center"); $("#page").css("position", "relative"); $("#imageInfo").css("margin", "0 auto 10px auto"); // $("#image").width(Math.min(oldX, $(window).width() - 76 - 150 - ($("#iphpbannerleft").length && $("#layerright").length ? 150 : 0))); /*150: layer rechts */ // if($(".matomyright").length == 1) $("#image").width(Math.min(oldX, $(window).width() - 76 - 150 - ($("#iphpbannerleft").length && $("#layerright").length ? 180 : 0))); /*150: layer rechts */ if ( ($("#image").width() > 0) && ($("#image").width() > $("#content").width()) ) { // Resize only overlarge images to fit into the Viewport from #content, // do not change sizes from images that are smaller then the Viewport! $("#image").width( $("#content").width() ); } else { // If image not yet loaded, start checkResize() after the Browser has loaded it $("#image").load(function() { oldX = $("#image").width(); checkResize(); }); } $("#imageresized").toggle($("#image").width() < oldX); if($("#image").width() < oldX) { $("#imageresized").show(); if(typeof(clickResize) == "undefined") clickResize = $("#image").click(function() { forceFull = !forceFull; checkResize(); }); } $("biggalnext").css("right", "17em"); //$("#adunten").css({position: "relative", top: "0", left: "0"}); } else { $("#layerright").hide(); $("#iphpbannerleft").hide(); $("#content").css("margin-right", ""); $("#content").css("margin-left", ""); $("#image").width(oldX); $("body").css("text-align", "left"); $("#page").css("position", "absolute"); $("#page").css("text-align", "center"); $("#imageInfo").css("margin", "0 0 10px 0"); $("#imageresized").hide(); $("#biggalnext").css("right", "5.2em"); //$("#adunten").css({position: "absolute", top: $("#page").offset().top + $("#page").outerHeight() + "px", left: ($(window).width() - $("#adunten ins").width())/2 + "px"}); } $(document).scroll(); } $(document).ready(function() { forceFull = false; // Always start checkResize() oldX = $("#image").width(); checkResize(); /*if(typeof(oldX) == "undefined" && $("#image").width() > 50 && typeof(window.opera) == "undefined") { oldX = $("#image").width(); checkResize(); }*/ $(window).resize(checkResize); var if_w = true var if_h = true var offset = 0 var if_src = 'http://megapicster.com/struktur/php/xxx.php' // dynamic //if(dach || typeof(dach) == 'undefined') $('#content').append($('
').append($('