{"version":3,"file":"jquery.ll.min.js","sources":["jquery.ll.js"],"sourcesContent":["// usage: log('inside coolFunc', this, arguments);\n// paulirish.com/2009/log-a-lightweight-wrapper-for-consolelog/\nwindow.log = function() {\n\tlog.history = log.history || [];\t// store logs to an array for reference\n\tlog.history.push(arguments);\n\targuments.callee = arguments.callee.caller;\n\tif (this.console) console.log(Array.prototype.slice.call(arguments));\n};\n\n// make it safe to use console.log always\n(function(b) {function c() {}for(var d=\"assert,count,debug,dir,dirxml,error,exception,group,groupCollapsed,groupEnd,info,log,markTimeline,profile,profileEnd,time,timeEnd,trace,warn\".split(\",\"),a;a=d.pop();)b[a]=b[a]||c;})(window.console=window.console||{});\n\nif (typeof LL == \"undefined\") {\n\tvar LL = {};\n}\n\nLL.defaults = {\n\t\"calendarIcon\": \"/resources/ver1-0/img/icon-calendar.png\",\n\t\"facebookAppId\": \"\",\n\t\"facebookLoginEnabled\": true,\n\t\"idLoginBox\": \"#loginbox_0\",\n\t\"idLoginForm\": \"#login_0\",\n\t\"idLoginLayer\": \"#login_head\",\n\t\"isLoggedIn\": false,\n\t\"isMobile\": false,\n\t\"textLogin\": \"Anmelden\",\n\t\"textLogout\": \"Abmelden\",\n\t\"urlLogin\": \"/community-webservice/service/login/\",\n\t\"urlLogout\": \"/community-webservice/service/logout/\",\n\t\"extLoginUrl\": \"/community-webservice/service/extloginuser/\",\n\t\"loginHtml\": \"\",\n\t\"loginErrors\": \"\"\n};\n\nLL.actions = {\n\t\"klick\": function(ivw_context, ga_context) {\n\t\tif ((ivw_context !== \"\") && (typeof IOMm_data !== \"undefined\") && (typeof IOMm !== \"undefined\")) {\n\t\t\ttry {\n\t\t\t\tIOMm(\"pageview\", IOMm_data);\n\t\t\t} catch (e) {\n\t\t\t\tlog(\"ERROR: IVW tracking (via IOMm) failed in LL.actions.klick()\", e);\n\t\t\t}\n\t\t}\n\n\t\tif (ga_context !== \"\") {\n\t\t\tif (!ga_context && (ivw_context !== \"\")) {\n\t\t\t\tga_context = ivw_context;\n\t\t\t}\n\n\t\t\ttry {\n\t\t\t\t_gaq.push(['_trackPageview', ga_context]);\n\t\t\t} catch(e) {\n\t\t\t\tlog(\"ERROR: Google tracking failed in LL.actions.klick()\", e);\n\t\t\t}\n\n\t\t\ttry {\n\t\t\t\tif (typeof dataLayer !== 'undefined') {\n\t\t\t\t\tdataLayer.push({\n\t\t\t\t\t\t'event': 'virtualPageViewTestcase',\n\t\t\t\t\t\t'virtualPageURL': ga_context,\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t} catch(e) {\n\t\t\t\tlog(\"ERROR: Google tracking failed in LL.actions.klick()\", e);\n\t\t\t}\n\t\t}\n\t},\n\n\t// 7.2.5.2.5 // done\n\t\"klick_videobox_thumbnail\": function(args) {\n\t\tvar title = args.title;\n\t\tLL.actions.klick(\"klick_videobox_thumbnail\" + \"_\" + title);\n\t},\n\t\"klick_videobox_pfeil_vor\": function(args) {\n\t\tLL.actions.klick(\"klick_videobox_pfeil_vor\");\n\t},\n\t\"klick_videobox_pfeil_zurueck\": function(args) {\n\t\tLL.actions.klick(\"klick_videobox_pfeil_zurueck\");\n\t},\n\t\"klick_videobox_lightbox_open\": function(args) {\n\t\tvar title = args.title;\n\t\tLL.actions.klick(\"klick_videobox_lightbox_open\" + \"_\" + title, \"\");\n\t},\n\t\"klick_videobox_lightbox_close\": function(args) {\n\t\t//var title = args.title;\n\t\t//LL.actions.klick(\"klick_videobox_lightbox_close\" + \"_\" + title);\n\t},\n\n\t// 7.2.7.2.5 // done\n\t\"klick_f_a_box_pfeil_vor\": function(args) {\n\t\tLL.actions.klick(\"klick_f_a_box_pfeil_vor\");\n\t},\n\t\"klick_f_a_box_pfeil_zurueck\": function(args) {\n\t\tLL.actions.klick(\"klick_f_a_box_pfeil_zurueck\");\n\t},\n\n\t// 7.2.9.2.5 // done\n\t\"klick_navigation_anmelden_lightbox_open\": function(args) {\n\t\tLL.actions.klick(\"\", \"klick_navigation_anmelden_lightbox_open\");\n\t},\n\t\"klick_anmelden_lightbox_ok_close\": function(args) {\n\t\t//LL.actions.klick(\"klick_anmelden_lightbox_ok_close\");\n\t},\n\t\"klick_anmelden_lightbox_manuell_close\": function(args) {\n\t\t//LL.actions.klick(\"klick_anmelden_lightbox_manuell_close\");\n\t},\n\t\"klick_anmelden_lightbox_senden_fehler\": function(args) {\n\t\tLL.actions.klick(\"klick_anmelden_lightbox_senden_fehler\");\n\t},\n\n\t// 7.2.15.2.5\n\t\"klick_nutzer_ranking_reiter\": function(args) {\n\t\tLL.actions.klick(\"klick_nutzer_ranking_reiter\");\n\t},\n\n\t// 7.4.1.2.5 // done\n\t\"klick_top_themen_pfeil_vor\": function(args) {\n\t\tLL.actions.klick(\"klick_top_themen_pfeil_vor\");\n\t},\n\t\"klick_top_themen_pfeil_zurueck\": function(args) {\n\t\tLL.actions.klick(\"klick_top_themen_pfeil_zurueck\");\n\t},\n\n\t// 7.4.2.2.5 // done\n\t\"klick_a_z_reiter\": function(args) {\n\t\tvar button_name = args.button_name;\n\t\tLL.actions.klick(\"klick_a_z_reiter\" + \"_\" + button_name);\n\t},\n\n\t// 7.4.5.2.5 // done\n\t\"klick_teaser_reiter\": function(args) {\n\t\tvar button_name = args.button_name;\n\t\tLL.actions.klick(\"klick_teaser_reiter\" + \"_\" + button_name);\n\t},\n\n\t\"klick_teaser_clip_paging\": function(args) {\n\t\tvar page = args.page;\n\t\tLL.actions.klick(\"klick_teaser_clip_paging\" + \"_\" + page);\n\t},\n\n\t// 7.4.8.2.5\n\t\"klick_f_a_box_reiter\": function(args) {\n\t\tLL.actions.klick(\"klick_f_a_box_reiter\");\n\t},\n\n\t// 7.4.9.2.5\n\t\"klick_kommentarmodul_reiter\": function(args) {\n\t\tLL.actions.klick(\"klick_kommentarmodul_reiter\");\n\t},\n\t\"klick_kommentarmodul_melden\": function(args) {\n\t\tLL.actions.klick(\"klick_kommentarmodul_melden\");\n\t},\n\t\"klick_kommentarmodul_melden_lightbox_manuell_close\": function(args) {\n\t\t//LL.actions.klick(\"klick_kommentarmodul_melden_lightbox_manuell_close\");\n\t},\n\t\"klick_kommentarmodul_melden_lightbox_ok_close\": function(args) {\n\t\t//LL.actions.klick(\"klick_kommentarmodul_melden_lightbox_ok_close\");\n\t},\n\t\"klick_kommentarmodul_melden_lightbox_fehler\": function(args) {\n\t\tLL.actions.klick(\"klick_kommentarmodul_melden_lightbox_fehler\");\n\t},\n\t\"klick_kommentarmodul_bewertung_hilfreich\": function(args) {\n\t\tLL.actions.klick(\"klick_kommentarmodul_bewertung_hilfreich\");\n\t},\n\t\"klick_kommentarmodul_mehr\": function(args) {\n\t\tLL.actions.klick(\"klick_kommentarmodul_mehr\");\n\t},\n\n\t// 7.4.10.2.5\n\t\"klick_fragestellen_anmelden_lightbox_open\": function(args) {\n\t\tLL.actions.klick(\"klick_fragestellen_anmelden_lightbox_open\");\n\t},\n\t\"klick_fragestellen_anmelden_lightbox_ok_close\": function(args) {\n\t\t//LL.actions.klick(\"klick_fragestellen_anmelden_lightbox_ok_close\");\n\t},\n\t\"klick_fragestellen_anmelden_lightbox_manuell_close\": function(args) {\n\t\t//LL.actions.klick(\"klick_fragestellen_anmelden_lightbox_manuell_close\");\n\t},\n\t\"klick_fragestellen_anmelden_lightbox_senden_fehler\": function(args) {\n\t\tLL.actions.klick(\"klick_fragestellen_anmelden_lightbox_senden_fehler\");\n\t},\n\n\t// 7.5.2.2.5 // done\n\t\"klick_karussell_pfeil_vor\": function(args) {\n\t\tLL.actions.klick(\"klick_karussell_pfeil_vor\");\n\t},\n\t\"klick_karussell_pfeil_zurueck\": function(args) {\n\t\tLL.actions.klick(\"klick_karussell_pfeil_zurueck\");\n\t},\n\t\"klick_karussell_button\": function(args) {\n\t\tLL.actions.klick(\"klick_karussell_button\");\n\t},\n\n\t// 7.6.2.2.5 // done\n\t\"klick_inlinebild_lightbox_open\": function(args) {\n\t\tvar title = args.title;\n\t\tLL.actions.klick(\"klick_inlinebild_lightbox_open\" + \"_\" + title);\n\t},\n\t\"klick_inlinebild_lightbox_close\": function(args) {\n\t\t//var title = args.title;\n\t\t//LL.actions.klick(\"klick_inlinebild_lightbox_close\" + \"_\" + title);\n\t},\n\n\t// 7.6.3.2.5 // done\n\t\"klick_fotostrecke_vor\": function(args) {\n\t\tvar headline = args.headline,\n\t\t\ttrigger = args.trigger,\n\t\t\tgaContext = document.location.pathname + document.location.hash;\n\t\tLL.actions.klick(\"klick_fotostrecke_vor\" + \"_\" + headline + \"_\" + trigger, gaContext);\n\t},\n\t\"klick_fotostrecke_zurueck\": function(args) {\n\t\tvar headline = args.headline,\n\t\t\ttrigger = args.trigger,\n\t\t\tgaContext = document.location.pathname + document.location.hash;\n\t\tLL.actions.klick(\"klick_fotostrecke_zurueck\" + \"_\" + headline + \"_\" + trigger, gaContext);\n\t},\n\n\t\"klick_expertise_vor\": function(args) {\n\t\tvar headline = args.headline,\n\t\t\ttrigger = args.trigger,\n\t\t\tgaContext = document.location.pathname + document.location.hash;\n\t\tLL.actions.klick(\"klick_expertise_vor\" + \"_\" + headline + \"_\" + trigger, gaContext);\n\t},\n\t\"klick_expertise_zurueck\": function(args) {\n\t\tvar headline = args.headline,\n\t\t\ttrigger = args.trigger,\n\t\t\tgaContext = document.location.pathname + document.location.hash;\n\t\tLL.actions.klick(\"klick_expertise_zurueck\" + \"_\" + headline + \"_\" + trigger, gaContext);\n\t},\n\n\t// Selftest (GESUND-588)\n\t\"klick_selftest\": function(args) {\n\t\tLL.actions.klick(\"klick_selftest\");\n\t}\n};\n\nLL.defaults.loginLayerOptions = {\n\t\"cache\": false,\n\t\"cookiename\": \"communitycookie\",\n\t\"html\": \"\",\n\t\"idLoginBox\": LL.defaults.idLoginBox,\n\t\"idLoginForm\": LL.defaults.idLoginForm,\n\t\"idLoginLayer\": LL.defaults.idLoginLayer,\n\t\"idUsername\": \"#username\",\n\t\"idPassword\": \"#password\",\n\t\"idSaveLogin\": \"#saveLogin\",\n\t\"textLogin\": LL.defaults.textLogin,\n\t\"textLogout\": LL.defaults.textLogout,\n\t\"urlLayer\" : \"\",\n\t\"urlLogin\": LL.defaults.urlLogin,\n\t\"urlLogout\": LL.defaults.urlLogout,\n\t\"postLoginAction\" : function () {},\n\t\"redirectAfterLoginUrl\": \"\",\n\t\"redirectExtLoginNotFoundUrl\": \"\"\n};\n\nLL.client = {\n\t\"os\": {\n\t\t\"name\": null,\n\t\t\"version\": null\n\t}\n};\n\n\nfunction detectClient() {\n\tvar ua = navigator.userAgent;\n\n\tif (ua.indexOf(\"Android\") >= 0) {\n\t\tLL.client.os.name = \"Android\";\n\t}\n\tif ((ua.indexOf(\"iPad\") >= 0) || (ua.indexOf(\"iPod\") >= 0) || (ua.indexOf(\"iPhone\") >= 0)) {\n\t\tLL.client.os.name = \"iOS\";\n\t\tvar osName = \"OS \";\n\t\tua = ua.replace( '_', '.' );\n\t\tLL.client.os.version = parseFloat(ua.slice(ua.indexOf(osName) + osName.length));\n\t}\n\n\tif (LL.client.os.name && !LL.client.os.version) {\n\t\tvar osName = LL.client.os.name;\n\t\tLL.client.os.version = parseFloat(ua.slice(ua.indexOf(osName) + osName.length + 1));\n\t}\n}\n\n// cookie handling\nfunction createCookie(name, value, days) {\n\tif (days) {\n\t\tcreateCookieSeconds(name, value, days*24*60*60);\n\t} else {\n\t\tcreateCookieSeconds(name, value);\n\t}\n}\n\nfunction createCookieSeconds(name, value, seconds) {\n\tif (seconds) {\n\t\tvar date = new Date();\n\t\tdate.setTime(date.getTime()+(seconds*1000));\n\t\tvar expires = \"; expires=\"+date.toGMTString();\n\t} else {\n\t\tvar expires = \"\";\n\t}\n\tdocument.cookie = name+\"=\"+value+expires+\"; path=/\";\n}\n\nfunction readCookie(name) {\n\tvar nameEQ = name + \"=\";\n\tvar ca = document.cookie.split(';');\n\tfor(var i=0;i < ca.length;i++) {\n\t\tvar c = ca[i];\n\t\twhile (c.charAt(0)==' ') c = c.substring(1,c.length);\n\t\tif (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);\n\t}\n\treturn null;\n}\n\nfunction eraseCookie(name) {\n\tcreateCookie(name,\"\",-1);\n}\n\n// fw functions\nfunction fwAjax(options) {\n\tvar opts = $.extend({\n\t\tcontext: document.body,\n\t\tdata: null,\n\t\terror: null,\n\t\tsuccess: null,\n\t\ttarget: null,\n\t\ttype: \"POST\",\n\t\turl: \"\"\n\t}, options);\n\n\tvar data = opts.data;\n\tif (!data && (opts.type == \"POST\")) {\n\t\tdata = \"nocache=\"+(Math.random()*100000);\n\t}\n\n\t$.ajax({\n\t\t\"cache\": false,\n\t\t\"context\": opts.context,\n\t\t\"data\": data,\n\t\t\"type\": opts.type,\n\t\t\"url\": opts.url\n\t})\n\t.success(function(data, textStatus, jqXHR) {\n\t\tif (opts.target) {\n\t\t\t$(opts.target).html(data);\n\t\t}\n\t\tif (typeof opts.success == \"function\") {\n\t\t\topts.success.call();\n\t\t}\n\t})\n\t.error(function(jqXHR, textStatus, errorThrown) {\n\t\tlog(jqXHR, textStatus, errorThrown);\n\t\tif (typeof opts.error == \"function\") {\n\t\t\topts.error.call();\n\t\t}\n\t});\n}\n\nfunction fwUpdateURLParameter(url, key, value) {\n\tvar re = new RegExp(\"([?|&])\" + key + \"=.*?(&|$)\", \"i\");\n\tseparator = url.indexOf('?') !== -1 ? \"&\" : \"?\";\n\tif (url.match(re)) {\n\t\treturn url.replace(re, '$1' + key + \"=\" + value + '$2');\n\t} else {\n\t\treturn url + separator + key + \"=\" + value;\n\t}\n}\n\n// GeoLocation\nfunction logGeoLocationError(error) {\n\tswitch (error.code) {\n\t\tcase error.PERMISSION_DENIED:\n\t\t\tlog(\"User denied the request for Geolocation.\");\n\t\t\tbreak;\n\t\tcase error.POSITION_UNAVAILABLE:\n\t\t\tlog(\"Location information is unavailable.\");\n\t\t\tbreak;\n\t\tcase error.TIMEOUT:\n\t\t\tlog(\"The request to get user location timed out.\");\n\t\t\tbreak;\n\t\tcase error.UNKNOWN_ERROR:\n\t\t\tlog(\"An unknown error occurred.\");\n\t\t\tbreak;\n\t}\n}\n\n// poll handling\nfunction ll_pollGoBack(widgetDiv) {\n\t$('#'+widgetDiv+'_r').hide();\n\t$('#'+widgetDiv).show();\n\n\tLL.actions.klick(\"klick_voting_goback\");\n\n\treturn false;\n}\n\nfunction ll_pollResults(widgetDiv) {\n\tvar url = $(\"#\"+widgetDiv+'_rb').attr(\"href\");\n\t$.ajax({\n\t\t\"cache\": false,\n\t\t\"data\": \"nocache=\"+(Math.random()*100000),\n\t\t\"type\": \"POST\",\n\t\t\"url\": url\n\t})\n\t.success(function(data, textStatus, jqXHR) {\n\t\t$(\"#\"+widgetDiv).hide();\n\t\t$(\"#\"+widgetDiv+'_r')\n\t\t\t.html(data)\n\t\t\t.show();\n\t\tLL.actions.klick(\"klick_voting_results\");\n\t})\n\t.error(function(jqXHR, textStatus, errorThrown) {\n\t\tlog(jqXHR, textStatus, errorThrown);\n\t});\n\n\treturn false;\n}\n\nfunction reloadAds() {\n\ttry {\n\t\tif (typeof Spark !== \"undefined\") {\n\t\t\tlog(\"Reloading Spark ads ...\");\n\n\t\t\tSpark.cmd.push(function() {\n\t\t\t\tSpark.definitionService.refresh();\n\t\t\t});\n\t\t}\n\n\t\tif (typeof ASCDP !== \"undefined\") {\n\t\t\tlog(\"Reloading ASMI ads ...\");\n\n\t\t\tASCDP.adS.reloadAds();\n\t\t}\n\n\t\tif (typeof adition !== \"undefined\") {\n\t\t\tlog(\"Reloading Adition ads ...\");\n\t\n\t\t\tadition.srq.push(function(api) {\n\t\t\t\tapi.load().completeRendering();\n\t\t\t});\n\t\t}\n\t} catch (e) {\n\t\tlog(\"Error: Failed reloading ads.\", e);\n\t}\n}\n\nfunction setDatepickerLanguage() {\n\t$.datepicker.regional['de'] = {\n\t\tchangeMonth: true,\n\t\tchangeYear: true,\n\t\tcloseText: 'schließen',\n\t\tprevText: '<zurück',\n\t\tnextText: 'Vor>',\n\t\tcurrentText: 'heute',\n\t\tmonthNames: ['Januar','Februar','März','April','Mai','Juni','Juli','August','September','Oktober','November','Dezember'],\n\t\tmonthNamesShort: ['Jan','Feb','Mär','Apr','Mai','Jun','Jul','Aug','Sep','Okt','Nov','Dez'],\n\t\tdayNames: ['Sonntag','Montag','Dienstag','Mittwoch','Donnerstag','Freitag','Samstag'],\n\t\tdayNamesShort: ['So','Mo','Di','Mi','Do','Fr','Sa'],\n\t\tdayNamesMin: ['So','Mo','Di','Mi','Do','Fr','Sa'],\n\t\tweekHeader: 'Wo',\n\t\tdateFormat: 'dd.mm.yy',\n\t\tfirstDay: 1,\n\t\tisRTL: false,\n\t\tshowMonthAfterYear: false,\n\t\tshowOtherMonths: false,\n\t\tselectOtherMonths: false,\n\t\tyearSuffix: ''\n\t};\n\t$.datepicker.setDefaults($.datepicker.regional['de']);\n}\n\n(function($) {\n\t// global object with settings\n\tvar ll = {\n\t\t// ie6 test\n\t\t\"isIE\": (function() { return /MSIE/i.test(navigator.userAgent); })(),\n\t\t// get url params as object\n\t\t\"params\": (function() {\n\t\t\tvar params = {};\n\t\t\tvar rawParams = window.location.search;\n\t\t\tif (rawParams === \"\") {\n\t\t\t\treturn params;\n\t\t\t}\n\t\t\telse {\n\t\t\t\trawParams = rawParams.substring(rawParams.indexOf(\"?\")+1).split(\"&\");\n\t\t\t\tfor(var idx in rawParams) {\n\t\t\t\t\tvar param = rawParams[idx].split(\"=\");\n\t\t\t\t\tparam[1] === \"true\" ? param[1] = true : param[1] = false;\n\t\t\t\t\tparams[param[0]] = param[1];\n\t\t\t\t}\n\t\t\t\treturn params;\n\t\t\t}\n\t\t})(),\n\t\tgetLightboxLayerTop: function (layerInnerHeight) {\n\t\t\tvar viewportHeight = $(window).height();\n\t\t\tvar viewportOffset = $(window).scrollTop();\n\t\t\tvar isTouchDevice = $(\"html\").hasClass(\"touch\");\n\n\t\t\tif (!isTouchDevice) {\n\t\t\t\treturn (viewportOffset + (viewportHeight/2 - layerInnerHeight/2));\n\t\t\t} else {\n\t\t\t\treturn (viewportOffset + 10);\n\t\t\t}\n\t\t}\n\t};\n\n\t(function() {\n\t\tif (ll.params.dev) {\n\t\t\t$(\".dev, .dev_q\").show();\n\t\t}\n\t})();\n\n\n\t// Helper function to get the right index for galleries.\n\tvar getIndex = function( idx, length ) {\n\t\tif ( idx >= length ) {\n\t\t\treturn idx % length;\n\t\t}\n\t\telse if ( idx < 0 ) {\n\t\t\treturn getIndex( length + (idx % length) );\n\t\t}\n\t\telse {\n\t\t\treturn idx;\n\t\t}\n\t};\n\n\n\t$.fn.reverse = [].reverse;\n\n\n\t/**\n\t * Lädt den Inhalt des angebundenen Elements von der im Parameter url
übergebenen\n\t * AJAX-URL in periodischem Abstand immer wieder.\n\t * \n\t * @param initial\n\t * Definiert, ob das erste Laden bereits beim Aufruf passieren soll (default: true).\n\t * @param interval\n\t * Definiert das Intervall in Millisekunden.\n\t * @param refresh\n\t * Definiert, ob das Laden periodisch wiederholt werden soll (default: true).\n\t */\n\t$.fn.fwAjaxRefresh = function(options) {\n\t\treturn this.each(function() {\n\t\t\tvar opts = $.extend({\n\t\t\t\tbefore: null,\n\t\t\t\tcontext: document.body,\n\t\t\t\tdata: null,\n\t\t\t\terror: null,\n\t\t\t\tinitial: true,\n\t\t\t\tinterval: null,\n\t\t\t\trefresh: true,\n\t\t\t\tsuccess: null,\n\t\t\t\ttype: \"GET\",\n\t\t\t\turl: null\n\t\t\t}, options);\n\n\t\t\tvar that = this;\n\n\t\t\tif (opts.initial) {\n\t\t\t\t$(that).fwAjaxUpdate(opts);\n\t\t\t\topts.initial = false;\n\t\t\t}\n\n\t\t\tif (opts.refresh) {\n\t\t\t\tsetTimeout(function () {\n\t\t\t\t\t$(that).fwAjaxUpdate(opts).fwAjaxRefresh(opts);\n\t\t\t\t}, opts.interval);\n\t\t\t}\n\t\t});\n\t}\n\n\t/**\n\t * Lädt den Inhalt des Elements target
, wenn der Wert der angebundenen Selectbox\n\t * geändert wird. Die AJAX-URLs müssen im value
der option
s stehen.\n\t */\n\t$.fn.fwAjaxSelect = function(options) {\n\t\treturn this.each(function() {\n\t\t\tvar opts = $.extend({\n\t\t\t\tbefore: null,\n\t\t\t\tcontext: document.body,\n\t\t\t\tdata: null,\n\t\t\t\terror: null,\n\t\t\t\tsuccess: null,\n\t\t\t\ttarget: null,\n\t\t\t\ttype: \"GET\"\n\t\t\t}, options);\n\n\t\t\t$(this).change(function() {\n\t\t\t\tvar url = $(this).val();\n\t\t\t\t$(opts.target).fwAjaxUpdate(opts);\n\t\t\t\treturn false;\n\t\t\t});\n\t\t});\n\t};\n\n\t/**\n\t * Lädt den Inhalt des angebundenen Elements von der im Parameter url
übergebenen\n\t * AJAX-URL.\n\t * \n\t * Beispiel: $(\"#elementId\").fwAjaxUpdate({\"url\": \"...\"});\n\t */\n\t$.fn.fwAjaxUpdate = function(options) {\n\t\treturn this.each(function() {\n\t\t\tvar opts = $.extend({\n\t\t\t\tbefore: null,\n\t\t\t\tcontext: document.body,\n\t\t\t\tdata: null,\n\t\t\t\terror: null,\n\t\t\t\tsuccess: null,\n\t\t\t\ttype: \"GET\",\n\t\t\t\turl: null\n\t\t\t}, options);\n\n\t\t\tvar that = this;\n\t\t\tvar data = opts.data;\n\t\t\tif (!data && (opts.type == \"POST\")) {\n\t\t\t\tdata = \"nocache=\"+(Math.random()*100000);\n\t\t\t}\n\n\t\t\tif (typeof opts.before == \"function\") {\n\t\t\t\tdata = opts.before.call(this, data);\n\t\t\t}\n\n\t\t\t$.ajax({\n\t\t\t\t\"cache\": false,\n\t\t\t\t\"context\": opts.context,\n\t\t\t\t\"data\": data,\n\t\t\t\t\"error\": function(jqXHR, textStatus, errorThrown) {\n\t\t\t\t\tlog(jqXHR, textStatus, errorThrown);\n\t\t\t\t\tif (typeof opts.error == \"function\") {\n\t\t\t\t\t\topts.error.call();\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t\"success\": function(data, textStatus, jqXHR) {\n\t\t\t\t\t$(that).html(data);\n\t\t\t\t\tif (typeof opts.success == \"function\") {\n\t\t\t\t\t\topts.success.call();\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t\"type\": opts.type,\n\t\t\t\t\"url\": opts.url\n\t\t\t});\n\t\t});\n\t};\n\n\n\t$.fn.llAsk = function( opts ) {\n\t\tvar options = $.extend({\n\t\t\turlLayer: \"ajax/_ask.html\"\n\t\t}, opts);\n\n\t\treturn this.each(function() {\n\n\t\t\t$(this)\n\t\t\t\t.click(function() {\n\t\t\t\t\t$(\"#layer\").llLayer({\n\t\t\t\t\t\t\"callback\": function() {\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\"closeCallback\": function() {\n\t\t\t\t\t\t\tLL.actions.klick_anmelden_lightbox_manuell_close();\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\"url\": options.urlLayer\n\t\t\t\t\t});\n\t\t\t\t\treturn false;\n\t\t\t\t});\n\t\t});\n\t};\n\n\n\t$.fn.llCaroussel = function(opts) {\n\t\tvar options = $.extend({\n\t\t\t\"duration\": 1000\n\t\t}, opts);\n\n\t\treturn this.each(function() {\n\t\t\t// jquery objects\n\t\t\tvar $paging = $(\".paging\", this);\n\t\t\tvar $previous = $(\".previous\", this);\n\t\t\tvar $next = $(\".next\", this);\n\t\t\tvar $pagingButtons = $(\".paging .btn\", this);\n\t\t\tvar $slider = $(\".slider\", this);\n\n\t\t\t// other vars\n\t\t\tvar index = 0;\n\t\t\tvar groupWidth = $(\".group\", this).outerWidth(true);\n\t\t\tvar groupSize = $(\".group\", this).size();\n\t\t\tvar sliderWidth = groupWidth * groupSize;\n\t\t\tvar sliderIsAnimated = false;\n\n\t\t\t$slider.width(sliderWidth);\n\n\t\t\tvar slide = function(idx, callback) {\n\t\t\t\t// set active state\n\t\t\t\t$pagingButtons\n\t\t\t\t\t.removeClass(\"active\")\n\t\t\t\t\t.eq(getIndex(idx, groupSize))\n\t\t\t\t\t.addClass(\"active\");\n\n\t\t\t\t// animate\n\t\t\t\tsliderIsAnimated = true;\n\t\t\t\t$slider\n\t\t\t\t\t.animate({\n\t\t\t\t\t\t\"left\": -(idx * groupWidth)\n\t\t\t\t\t},\n\t\t\t\t\toptions.duration,\n\t\t\t\t\tfunction() {\n\t\t\t\t\t\tif (typeof callback === \"function\") {\n\t\t\t\t\t\t\tcallback.call();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tsliderIsAnimated = false;\n\t\t\t\t\t});\n\t\t\t};\n\n\n\t\t\t$pagingButtons.click(function(e) {\n\t\t\t\te.preventDefault();\n\t\t\t\tif (sliderIsAnimated) { return false; }\n\t\t\t\tvar idx = $pagingButtons.index(this);\n\t\t\t\tslide(idx);\n\t\t\t\tindex = getIndex(idx, groupSize);\n\n\t\t\t\tLL.actions.klick_karussell_button();\n\t\t\t});\n\n\t\t\t$previous.click(function(e) {\n\t\t\t\te.preventDefault();\n\t\t\t\tif (sliderIsAnimated) { return false; }\n\t\t\t\tvar idx = index-1;\n\n\t\t\t\tif (idx < 0) {\n\t\t\t\t\tvar offsetLeft = $slider.position().left;\n\t\t\t\t\tvar $originals = $slider.find(\".group\");\n\n\t\t\t\t\t$slider\n\t\t\t\t\t\t.width(sliderWidth*2)\n\t\t\t\t\t\t.prepend($slider.html())\n\t\t\t\t\t\t.css({\n\t\t\t\t\t\t\t\"left\": -sliderWidth\n\t\t\t\t\t\t});\n\n\t\t\t\t\tslide(getIndex(idx, groupSize), function() {\n\t\t\t\t\t\t$originals.remove();\n\t\t\t\t\t\t$slider.width(sliderWidth);\n\t\t\t\t\t\tindex = getIndex(idx, groupSize);\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tslide(idx);\n\t\t\t\t\tindex = getIndex(idx, groupSize);\n\t\t\t\t}\n\n\t\t\t\tLL.actions.klick_karussell_pfeil_zurueck();\n\t\t\t});\n\n\t\t\t$next.click(function(e) {\n\t\t\t\te.preventDefault();\n\t\t\t\tif (sliderIsAnimated) { return false; }\n\t\t\t\tvar idx = index+1;\n\n\t\t\t\tif (idx === groupSize) {\n\t\t\t\t\tvar $originals = $slider.find(\".group\");\n\n\t\t\t\t\t$slider\n\t\t\t\t\t\t.width(sliderWidth*2)\n\t\t\t\t\t\t.append($slider.html());\n\n\t\t\t\t\tslide(idx, function() {\n\t\t\t\t\t\t$originals.remove();\n\t\t\t\t\t\t$slider\n\t\t\t\t\t\t\t.css({\n\t\t\t\t\t\t\t\t\"left\": 0\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t.width(sliderWidth);\n\t\t\t\t\t\tindex = getIndex(idx, groupSize);\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tslide(idx);\n\t\t\t\t\tindex = getIndex(idx, groupSize);\n\t\t\t\t}\n\n\t\t\t\tLL.actions.klick_karussell_pfeil_vor();\n\t\t\t});\n\n\n\t\t\t// show paging\n\t\t\t$paging.show();\n\t\t});\n\t};\n\n\n\t$.fn.llCommentFormToggle = function() {\n\t\treturn this.each(function() {\n\n\t\t\t$(\".more\", this).toggle(\n\t\t\t\t\tfunction() {\n\t\t\t\t\t\t$(this)\n\t\t\t\t\t\t\t.text(\"Kommentareingabe schließen\")\n\t\t\t\t\t\t\t.addClass(\"open\")\n\t\t\t\t\t\t\t.next(\"form\")\n\t\t\t\t\t\t\t.slideDown();\n\t\t\t\t\t},\n\t\t\t\t\tfunction() {\n\t\t\t\t\t\t$(this)\n\t\t\t\t\t\t\t.text(\"Antwort kommentieren\")\n\t\t\t\t\t\t\t.removeClass(\"open\")\n\t\t\t\t\t\t\t.next(\"form\")\n\t\t\t\t\t\t\t.slideUp();\n\t\t\t\t\t});\n\n\t\t});\n\t};\n\n\n\t$.fn.llDailyDosis = function(opts) {\n\t\tvar options = $.extend({\n\t\t\t\"duration\": 1000\n\t\t}, opts);\n\n\t\treturn this.each(function() {\n\n\t\t\tvar $dd = $(\"#daily_dosis\", this);\n\t\t\tvar $switch = $(\"#dd_switch\", this);\n\n\t\t\t$switch.click(function(e) {\n\t\t\t\te.preventDefault();\n\n\t\t\t\tif ($dd.is(\":visible\")) {\n\t\t\t\t\t$switch\n\t\t\t\t\t\t.addClass(\"not_expanded\")\n\t\t\t\t\t\t.removeClass(\"expanded\");\n\t\t\t\t\t$dd.slideUp(options.duration);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$switch\n\t\t\t\t\t\t.addClass(\"expanded\")\n\t\t\t\t\t\t.removeClass(\"not_expanded\");\n\t\t\t\t\t$dd.slideDown(options.duration);\n\t\t\t\t}\n\t\t\t});\n\n\t\t});\n\t};\n\n\n\t$.fn.llDatepicker = function(options) {\n\t\treturn this.each(function() {\n\t\t\t// Initialize when DOM is ready. jQueryUI + Datepicker are loaded at the end of the document\n\t\t\t$(function () {\n\t\t\t\tvar opts = $.extend({\n\t\t\t\t\t\"showOn\": \"button\",\n\t\t\t\t\t\"buttonImage\": LL.defaults.calendarIcon,\n\t\t\t\t\t\"buttonImageOnly\": true,\n\t\t\t\t\t\"numberOfMonths\": [1, 1],\n\t\t\t\t\t\"showOptions\": { \"direction\": \"down\" },\n\t\t\t\t\t\"dateFormat\": \"dd.mm.yy\",\n\t\t\t\t\t\"stepMonths\": 1,\n\t\t\t\t\t\"option\": $.datepicker.regional['de']\n\t\t\t\t}, options);\n\n\t\t\t\t$(this).datepicker(opts);\n\t\t\t});\n\t\t});\n\t};\n\n\n\t$.fn.llDoxter = function() {\n\t\treturn this.each(function() {\n\t\t\tvar $links = $(\"a\", this);\n\n\t\t\tif (navigator.geolocation) {\n\t\t\t\tnavigator.geolocation.getCurrentPosition(function(position) {\n\t\t\t\t\tvar lat = position.coords.latitude;\n\t\t\t\t\tvar lon = position.coords.longitude;\n\n\t\t\t\t\t$links.each(function() {\n\t\t\t\t\t\tvar $link = $(this);\n\t\t\t\t\t\tvar url = $link.attr(\"href\");\n\t\t\t\t\t\tvar locationExists = (url.indexOf(\"&lng=\") > 0);\n\n\t\t\t\t\t\tif (!locationExists) {\n\t\t\t\t\t\t\turl += (url.indexOf(\"?\") == -1) ? \"?\" : \"&\";\n\t\t\t\t\t\t\turl += \"lat=\" + lat + \"&lng=\" + lon;\n\n\t\t\t\t\t\t\t$link.attr(\"href\", url);\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}, logGeoLocationError);\n\t\t\t}\n\t\t});\n\t};\n\n\n\t$.fn.llForm = function(options) {\n\n\t\treturn this.each(function() {\n\n\t\t\tvar opts = $.extend({\n\t\t\t\tbefore : null,\n\t\t\t\tcontext : document.body,\n\t\t\t\terror : null,\n\t\t\t\tsuccess : null,\n\t\t\t\ttype : \"POST\",\n\t\t\t\turl : \"\"\n\t\t\t}, options);\n\n\t\t\tvar that = this;\n\t\t\tvar $that = $(this);\n\t\t\tvar $form = $(\"form\", this);\n\n\t\t\tvar $submitLink = $(\"a.submit\", this);\n\n\t\t\t$submitLink.live(\"click\", function() {\n\t\t\t\t$parentForm = $(this).closest(\"form\");\n\t\t\t\t$parentForm.trigger(\"submit\");\n\t\t\t\treturn false;\n\t\t\t});\n\n\t\t\t$submitLink = $(\"a.submitAction\", this);\n\n\t\t\t$submitLink.live(\"click\", function() {\n\t\t\t\t$parentForm = $(this).closest(\"form\");\n\t\t\t\t$parentForm.trigger(\"submit\");\n\t\t\t\treturn false;\n\t\t\t});\n\t\t\t\n\t\t\t$(\"input[type=submit]\", this).live(\"click\", function() {\n\t\t\t\t$(\"input[name=action]\", that).val($(this).attr(\"name\"));\n\t\t\t});\n\n\t\t\t$form.live(\"submit\", function() {\n\t\t\t\tvar data = $(this).serializeArray();\n\n\t\t\t\tif (typeof opts.before == \"function\") {\n\t\t\t\t\tdata = opts.before.call(this, data);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$.ajax({\n\t\t\t\t\t\"cache\": false,\n\t\t\t\t\t\"context\" : opts.context,\n\t\t\t\t\t\"data\" : data,\n\t\t\t\t\t\"type\" : opts.type,\n\t\t\t\t\t\"url\" : opts.url\n\t\t\t\t}).success(function(data, textStatus, jqXHR) {\n\t\t\t\t\t$that.html(data);\n\t\t\t\t\tif (typeof opts.success == \"function\") {\n\t\t\t\t\t\topts.success.call();\n\t\t\t\t\t}\n\t\t\t\t}).error(function(jqXHR, textStatus, errorThrown) {\n\t\t\t\t\tlog(jqXHR, textStatus, errorThrown);\n\t\t\t\t\tif (typeof opts.error == \"function\") {\n\t\t\t\t\t\topts.error.call();\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\treturn false;\n\t\t\t});\n\t\t});\n\t};\n\n\n\t$.fn.llJsonForm = function( options ) {\n\n\t\treturn this.each(function() {\n\n\t\t\tvar opts = $.extend({\n\t\t\t\tbefore: null,\n\t\t\t\tcontext: document.body,\n\t\t\t\terror: null,\n\t\t\t\tsuccess: null,\n\t\t\t\ttype: \"POST\",\n\t\t\t\turl: \"\"\n\t\t\t}, options);\n\t\t\tif (\n\t\t\t\t(\n\t\t\t\t\topts.success === null ||\n\t\t\t\t\topts.error === null\n\t\t\t\t) &&\n\t\t\t\t(\n\t\t\t\t\ttypeof opts.success !== \"function\" ||\n\t\t\t\t\ttypeof opts.error !== \"function\"\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\tthrow \"llJsonForm instantiation error: a success and a error handler have to be included in the options!\";\n\t\t\t}\n\n\t\t\tvar $that = $(this);\n\t\t\tvar $form = $(\"form\", this);\n\n\t\t\tvar $submitLink = $(\".submit\", this);\n\n\t\t\t$submitLink\n\t\t\t\t.click(function() {\n\t\t\t\t\t$form.trigger(\"submit\");\n\t\t\t\t\treturn false;\n\t\t\t\t});\n\n\t\t\t$form\n\t\t\t\t.live(\"submit\", function() {\n\t\t\t\t\tvar dataString = $(this).serialize();\n\n\t\t\t\t\tif (typeof opts.before === \"function\") {\n\t\t\t\t\t\tdataString = opts.before.call(this, dataString);\n\t\t\t\t\t}\n\n\t\t\t\t\t$.ajax({\n\t\t\t\t\t\t\"cache\": false,\n\t\t\t\t\t\t\"context\": opts.context,\n\t\t\t\t\t\t\"data\": dataString,\n\t\t\t\t\t\t\"type\": opts.type,\n\t\t\t\t\t\t\"url\": opts.url\n\t\t\t\t\t})\n\t\t\t\t\t.success(function(data, textStatus, jqXHR) {\n\t\t\t\t\t\topts.success.apply(this, arguments);\n\t\t\t\t\t})\n\t\t\t\t\t.error(function(jqXHR, textStatus, errorThrown) {\n\t\t\t\t\t\tlog(jqXHR, textStatus, errorThrown);\n\t\t\t\t\t\topts.error.apply(this, arguments);\n\t\t\t\t\t});\n\n\t\t\t\t\treturn false;\n\t\t\t\t});\n\t\t});\n\t};\n\n\n\t$.fn.llImgZoom = function(opts) {\n\n\t\treturn this.each(function() {\n\t\t\tvar options = $.extend({\n\t\t\t\t\"html\": \"\"\n\t\t\t}, opts);\n\n\t\t\tvar $imgLink = $(\".img a\", this);\n\t\t\tvar alt = $(\".img img\", this).attr(\"alt\");\n\n\t\t\t// append magnifier glas\n\t\t\t$imgLink\n\t\t\t\t.append(\"\")\n\t\t\t\t.click(\"click\", function(e) {\n\t\t\t\t\te.preventDefault();\n\t\t\t\t\tLL.actions.klick_inlinebild_lightbox_open({\n\t\t\t\t\t\t\"title\": alt\n\t\t\t\t\t});\n\n\t\t\t\t\t$(\"#layer\").llLayerInject({\n\t\t\t\t\t\t\"closeCallback\": function() {\n\t\t\t\t\t\t\tLL.actions.klick_inlinebild_lightbox_close({\n\t\t\t\t\t\t\t\t\"title\": alt\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\"html\": options.html\n\t\t\t\t\t});\n\t\t\t\t\treturn false;\n\t\t\t\t});\n\t\t});\n\t};\n\n\n\t$.fn.llGalleryEdit = function() {\n\t\treturn this.each(function() {\n\t\t\tvar $input = $(\".images .image input\", this);\n\t\t\tvar $selectCount = $(\".selectCountValue\", this);\n\t\t\tvar that = this;\n\n\t\t\t$input.click(function() {\n\t\t\t\tvar count = 0;\n\n\t\t\t\t$input.each(function() {\n\t\t\t\t\tif ($(this).is(':checked')) {\n\t\t\t\t\t\tcount++;\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\t$selectCount.html(count);\n\t\t\t});\n\t\t});\n\t};\n\n\n\t$.fn.llGalleryView = function(options) {\n\t\treturn this.each(function() {\n\t\t\tvar opts = $.extend({\n\t\t\t\t\"galleryClass\": \"gallery\"\n\t\t\t}, options);\n\n\t\t\tvar $links = $(\".view\", this);\n\t\t\tvar that = this;\n\n\t\t\t$links.click(function(e) {\n\t\t\t\te.preventDefault();\n\n\t\t\t\t// Da der Button kein href hat, den Link im selben \"gallery\"-div ermitteln:\n\t\t\t\tvar $gallery = $(this).closest(\".\" + opts.galleryClass);\n\t\t\t\tvar url = $(\"a.view\", $gallery).attr(\"href\");\n\n\t\t\t\t$(\"#layer\").llLayer({\n\t\t\t\t\t\"closeCallback\": function() {\n\t\t\t\t\t\t$(\"#layer\").html(\"\");\n\t\t\t\t\t},\n\t\t\t\t\t\"duration\": 0,\n\t\t\t\t\t\"method\": \"POST\",\n\t\t\t\t\t\"url\": url\n\t\t\t\t});\n\t\t\t\treturn false;\n\t\t\t});\n\t\t});\n\t};\n\n\n\t$.fn.llLayerInject = function(opts) {\n\n\t\treturn this.each(function() {\n\t\t\tvar options = $.extend({\n\t\t\t\t\"callback\": null,\n\t\t\t\t\"closeCallback\": null, // will be called after the layer is closed\n\t\t\t\t\"closeOnClick\": true,\n\t\t\t\t\"duration\": 500, // fadeIn/fadeOut duration\n\t\t\t\t\"html\": null\n\t\t\t}, opts);\n\n\t\t\tvar $layer = $(this);\n\n\t\t\tvar closeLayer = function() {\n\t\t\t\t$layer.fadeOut(options.duration);\n\t\t\t\tif (typeof options.closeCallback == \"function\") {\n\t\t\t\t\toptions.closeCallback.call();\n\t\t\t\t}\n\t\t\t};\n\n\t\t\t// fade in, resize layer. add closing\n\t\t\tvar init = function() {\n\t\t\t\tresizeLayer();\n\t\t\t\t$layer\n\t\t\t\t\t//.fadeIn(options.duration)\n\t\t\t\t\t.show();\n\t\t\t\tif (options.closeOnClick) {\n\t\t\t\t\t$layer\n\t\t\t\t\t\t.addClass(\"clickable\")\n\t\t\t\t\t\t.unbind(\"click\")\n\t\t\t\t\t\t.click(function(e) {\n\t\t\t\t\t\t\tif (e.target===this) {\n\t\t\t\t\t\t\t\t$(window).unbind(\"resize\");\n\t\t\t\t\t\t\t\tcloseLayer();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t};\n\n\t\t\t// var position the layer\n\t\t\tvar positionInnerLayer = function() {\n\n\t\t\t\t$layer.css({\n\t\t\t\t\t\"display\": \"block\",\n\t\t\t\t\t\"visibility\": \"hidden\"\n\t\t\t\t});\n\n\t\t\t\tvar $layerInner = $(\".layer_inner\", $layer);\n\n\t\t\t\tvar offsetTop = ll.getLightboxLayerTop($layerInner.outerHeight(false));\n\n\t\t\t\t// set width if .img\n\t\t\t\tif ($layer.find(\".layer_img\").size()) {\n\t\t\t\t\tvar width = $layer.find(\".img img\").width();\n\t\t\t\t\t$layerInner\n\t\t\t\t\t\t.width(width);\n\t\t\t\t}\n\n\t\t\t\t$layer.css({\n\t\t\t\t\t\"visibility\": \"visible\"\n\t\t\t\t});\n\n\t\t\t\t$layerInner\n\t\t\t\t\t.css({\n\t\t\t\t\t\t\"margin-top\": offsetTop,\n\t\t\t\t\t\t\"visibility\": \"visible\"\n\t\t\t\t\t});\n\t\t\t};\n\n\t\t\t// add resizing functionality\n\t\t\tvar resizeLayer = function() {\n\t\t\t\tvar layerHeight = $(\"body\").height() < $(window).height() ? $(window).height() : $(\"body\").height();\n\t\t\t\tvar layerWidth = $(window).width();\n\n\t\t\t\t$layer\n\t\t\t\t\t.css({\n\t\t\t\t\t\t\"height\": layerHeight,\n\t\t\t\t\t\t\"width\": layerWidth\n\t\t\t\t\t});\n\t\t\t};\n\n\t\t\t// Nicht bei Touch-Devices, da es Probleme macht, wenn die Tastatur eingeblendet wird!\n\t\t\tvar isTouchDevice = $(\"html\").hasClass(\"touch\");\n\t\t\tif (!isTouchDevice) {\n\t\t\t\t$(window).resize(function() {\n\t\t\t\t\tresizeLayer();\n\t\t\t\t\tpositionInnerLayer();\n\t\t\t\t});\n\t\t\t}\n\n\t\t\t// inject html and position\n\t\t\t$layer\n\t\t\t\t.html(options.html)\n\t\t\t\t.find(\".close\")\n\t\t\t\t.click(function() {\n\t\t\t\t\t$(window).unbind(\"resize\");\n\t\t\t\t\tcloseLayer();\n\t\t\t\t});\n\n\t\t\t$(\".layer_inner\", $layer).show();\n\t\t\tpositionInnerLayer();\n\n\t\t\tif (typeof options.callback === \"function\") {\n\t\t\t\toptions.callback.call();\n\t\t\t}\n\n\t\t\t// call init if the layer is hidden\n\t\t\t//if ($layer.is(\":hidden\")) {\n\t\t\t\tinit();\n\t\t\t//}\n\n\t\t});\n\t};\n\n\n\t$.fn.llLayer = function(opts) {\n\t\treturn this.each(function() {\n\t\t\tvar options = $.extend({\n\t\t\t\t\"callback\": null,\n\t\t\t\t\"closeCallback\": null, // will be called after the layer is closed\n\t\t\t\t\"closeOnClick\": true,\n\t\t\t\t\"data\": null,\n\t\t\t\t\"duration\": 1000, // fadeIn/fadeOut duration\n\t\t\t\t\"focusId\": null,\n\t\t\t\t\"method\": \"GET\",\n\t\t\t\t\"responseType\": \"html\",\n\t\t\t\t\"url\": null\n\t\t\t}, opts);\n\n\t\t\tvar $layer = $(this);\n\t\t\tvar data = options.data;\n\t\t\tif (!data && (options.method == \"POST\")) {\n\t\t\t\tdata = \"nocache=\"+(Math.random()*100000);\n\t\t\t}\n\n\t\t\tvar closeLayer = function() {\n\t\t\t\t$layer.fadeOut(options.duration);\n\t\t\t\tif (typeof options.closeCallback == \"function\") {\n\t\t\t\t\toptions.closeCallback.call();\n\t\t\t\t}\n\t\t\t};\n\n\t\t\t// fade in, resize layer. add closing\n\t\t\tvar init = function() {\n\t\t\t\tresizeLayer();\n\t\t\t\t$layer\n\t\t\t\t\t//.fadeIn(options.duration)\n\t\t\t\t\t.show();\n\t\t\t\tif (options.closeOnClick) {\n\t\t\t\t\t$layer\n\t\t\t\t\t\t.addClass(\"clickable\")\n\t\t\t\t\t\t.unbind(\"click\")\n\t\t\t\t\t\t.click(function(e) {\n\t\t\t\t\t\t\tif (e.target===this) {\n\t\t\t\t\t\t\t\tcloseLayer();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t};\n\n\t\t\t// var position the layer\n\t\t\tvar positionInnerLayer = function() {\n\t\t\t\tvar $layerInner = $(\".layer_inner\", $layer);\n\n\t\t\t\tvar offsetTop = ll.getLightboxLayerTop($layerInner.outerHeight(false));\n\n\t\t\t\t// set width if .img\n\t\t\t\tif ($layer.find(\".layer_img\").size()) {\n\t\t\t\t\tvar width = $layer.find(\".img img\").width();\n\t\t\t\t\t$layerInner\n\t\t\t\t\t\t.width(width);\n\t\t\t\t}\n\n\t\t\t\t$layerInner\n\t\t\t\t\t.css({\n\t\t\t\t\t\t\"margin-top\": offsetTop,\n\t\t\t\t\t\t\"visibility\": \"visible\"\n\t\t\t\t\t});\n\t\t\t};\n\n\t\t\t// add resizing functionality\n\t\t\tvar resizeLayer = function() {\n\t\t\t\tvar layerHeight = $(\"body\").height() < $(window).height() ? $(window).height() : $(\"body\").height();\n\t\t\t\tvar layerWidth = $(window).width();\n\n\t\t\t\t$layer\n\t\t\t\t\t.css({\n\t\t\t\t\t\t\"height\": layerHeight,\n\t\t\t\t\t\t\"width\": layerWidth\n\t\t\t\t\t});\n\t\t\t};\n\n\t\t\t// Nicht bei Touch-Devices, da es Probleme macht, wenn die Tastatur eingeblendet wird!\n\t\t\tvar isTouchDevice = $(\"html\").hasClass(\"touch\");\n\t\t\tif (!isTouchDevice) {\n\t\t\t\t$(window).resize(function() {\n\t\t\t\t\tresizeLayer();\n\t\t\t\t\tpositionInnerLayer();\n\t\t\t\t});\n\t\t\t}\n\n\t\t\t// load ajax and position\n\t\t\t$.ajax({\n\t\t\t\t\"cache\": false,\n\t\t\t\t\"dataType\": options.responseType,\n\t\t\t\t\"type\": options.method,\n\t\t\t\t\"url\": options.url,\n\t\t\t\t\"data\": data\n\t\t\t})\n\t\t\t\t.success(function(response) {\n\t\t\t\t\t// strip body\n\t\t\t\t\t$layer\n\t\t\t\t\t\t.html(response)\n\t\t\t\t\t\t.find(\".close\")\n\t\t\t\t\t\t.unbind(\"click\")\n\t\t\t\t\t\t.click(function() {\n\t\t\t\t\t\t\tcloseLayer();\n\t\t\t\t\t\t});\n\n\t\t\t\t\tpositionInnerLayer();\n\n\t\t\t\t\tif (options.focusId) {\n\t\t\t\t\t\tvar elem = document.getElementById(options.focusId);\n\t\t\t\t\t\tif (elem) {\n\t\t\t\t\t\t\telem.focus();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif (typeof options.callback === \"function\") {\n\t\t\t\t\t\toptions.callback.call();\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t// call init if the layer is hidden\n\t\t\tif ($layer.is(\":hidden\")) {\n\t\t\t\tinit();\n\t\t\t}\n\t\t});\n\t};\n\n\n\t$.fn.llLink = function( options ) {\n\n\t\treturn this.each(function() {\n\n\t\t\tvar opts = $.extend({\n\t\t\t\tbefore: null,\n\t\t\t\tcontext: document.body,\n\t\t\t\tdata: null,\n\t\t\t\terror: null,\n\t\t\t\tklick_function: null,\n\t\t\t\tklick_function_use_title_as_button_name: false,\n\t\t\t\tsuccess: null,\n\t\t\t\ttarget: null,\n\t\t\t\ttype: \"POST\",\n\t\t\t\turl: $(this).data(\"ajax-url\") || $(this).attr(\"href\")\n\t\t\t}, options);\n\n\t\t\tvar that = this;\n\n\t\t\t$(this)\n\t\t\t\t.click(function() {\n\t\t\t\t\tvar data = opts.data;\n\t\t\t\t\tif (!data && (opts.type == \"POST\")) {\n\t\t\t\t\t\tdata = \"nocache=\"+(Math.random()*100000);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (typeof opts.before == \"function\") {\n\t\t\t\t\t\tdata = opts.before.call(this, data);\n\t\t\t\t\t}\n\n\t\t\t\t\t$.ajax({\n\t\t\t\t\t\t\"cache\": false,\n\t\t\t\t\t\t\"context\": opts.context,\n\t\t\t\t\t\t\"data\": data,\n\t\t\t\t\t\t\"type\": opts.type,\n\t\t\t\t\t\t\"url\": opts.url\n\t\t\t\t\t})\n\t\t\t\t\t.success(function(data, textStatus, jqXHR) {\n\t\t\t\t\t\t$(opts.target).html(data);\n\t\t\t\t\t\tif ( typeof opts.success == \"function\" ) {\n\t\t\t\t\t\t\topts.success.call();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (typeof opts.klick_function == \"function\") {\n\t\t\t\t\t\t\tif (opts.klick_function_use_title_as_button_name) {\n\t\t\t\t\t\t\t\topts.klick_function( { button_name: $(that).attr('title') } );\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\topts.klick_function( { button_name: $(that).text() } );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t})\n\t\t\t\t\t.error(function(jqXHR, textStatus, errorThrown) {\n\t\t\t\t\t\tlog(jqXHR, textStatus, errorThrown);\n\t\t\t\t\t\tif ( typeof opts.error == \"function\" ) {\n\t\t\t\t\t\t\topts.error.call();\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\n\t\t\t\t\treturn false;\n\t\t\t\t});\n\t\t});\n\t};\n\n\n\t$.fn.llLoadTab = function(opts) {\n\t\tvar options = $.extend({\n\t\t\turl : null\n\t\t}, opts);\n\t\t\n\t\tvar that = this;\n\t\n\t\t$.ajax({\n\t\t\t\"type\": \"GET\",\n\t\t\t\"url\": options.url\n\t\t})\n\t\t.success(function(data, textStatus, jqXHR) {\n\t\t\t$(that).html(data);\n\t\t})\n\t\t.error(function(jqXHR, textStatus, errorThrown) {\n\t\t\tlog(\"error\", jqXHR, textStatus, errorThrown);\n\t\t});\n\t};\n\n\n\t$.fn.llLoggedOutOnly = function() {\n\t\tvar cookie = readCookie(\"communitycookie\");\n\n\t\tif (cookie !== null) { // logged in\n\t\t\t$(this).hide();\n\t\t}\n\t};\n\n\n\t$.fn.llLogin = function(opts) {\n\t\treturn this.each(\n\t\t\tfunction () {\n\t\t\t\tvar that = this;\n\t\t\t\tvar options = $.extend({\n\t\t\t\t\t\"cache\": false,\n\t\t\t\t\t\"cookiename\": \"communitycookie\",\n\t\t\t\t\t\"idLoginBox\": LL.defaults.idLoginBox,\n\t\t\t\t\t\"idLoginForm\": LL.defaults.idLoginForm,\n\t\t\t\t\t\"idLoginLayer\": LL.defaults.idLoginLayer,\n\t\t\t\t\t\"idUsername\": LL.defaults.idLoginForm + \"_0\",\n\t\t\t\t\t\"idPassword\": LL.defaults.idLoginForm + \"_1\",\n\t\t\t\t\t\"idSaveLogin\": LL.defaults.idLoginForm + \"_saveLogin\",\n\t\t\t\t\t\"textLogin\": LL.defaults.textLogin,\n\t\t\t\t\t\"textLogout\": LL.defaults.textLogout,\n\t\t\t\t\t\"urlLayer\" : \"\",\n\t\t\t\t\t\"urlLogin\": LL.defaults.urlLogin,\n\t\t\t\t\t\"urlLogout\": LL.defaults.urlLogout,\n\t\t\t\t\t\"postLoginAction\" : function () {},\n\t\t\t\t\t\"redirectAfterLoginUrl\": LL.defaults.loginLayerOptions.redirectAfterLoginUrl\n\t\t\t\t}, opts);\n\n\t\t\t\tvar $errorMessage = $(\".error_message\", this);\n\t\t\t\tvar $loginBox = $(\"#\" + options.loginBox);\n\n\t\t\t\t// check for cookie\n\t\t\t\tvar cookie = readCookie(options.cookiename);\n\n\t\t\t\tif (cookie === null) {\n\t\t\t\t\t// not logged in\n\t\t\t\t\t$loginBox.slideDown();\n\t\t\t\t} else {\n\t\t\t\t\t// logged in\n\t\t\t\t\t$loginBox.slideUp();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t$(this)\n\t\t\t\t\t.unbind(\"submit\")\n\t\t\t\t\t.submit(function () {\n\t\t\t\t\t\tvar form = this;\n\t\t\t\t\t\tvar submit = true;\n\t\t\t\t\t\tvar data = $(this).serializeArray();\n\t\t\t\t\t\tvar cookieTimeout = 10 * 365 * 86400;\t// 10 Jahre in Sekunden\n\t\n\t\t\t\t\t\tif ($(options.idSaveLogin, form).is(':checked')) {\n\t\t\t\t\t\t\tdata.push({ \"name\": \"cookieTimeout\", \"value\": (cookieTimeout) });\n\t\t\t\t\t\t}\n\t\n\t\t\t\t\t\t$(\"input\", this).removeClass(\"error\");\n\t\t\t\t\t\t$errorMessage.html('');\n\t\n\t\t\t\t\t\tif ($(options.idUsername, this).val() === \"\") {\n\t\t\t\t\t\t\t$(options.idUsername, this).addClass(\"error\");\n\t\t\t\t\t\t\tsubmit = false;\n\t\t\t\t\t\t\t$errorMessage.append('Benutzername / E-Mail darf nicht leer sein!');\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ($(options.idPassword, this).val() === \"\") {\n\t\t\t\t\t\t\t$(options.idPassword, this).addClass(\"error\");\n\t\t\t\t\t\t\tsubmit = false;\n\t\t\t\t\t\t\t$errorMessage.append('
Das Passwort darf nicht leer sein!');\n\t\t\t\t\t\t}\n\t\n\t\t\t\t\t\tif (submit) {\n\t\t\t\t\t\t\t$.ajax({\n\t\t\t\t\t\t\t\t\"cache\": options.cache,\n\t\t\t\t\t\t\t\t\"data\": data,\n\t\t\t\t\t\t\t\t\"type\": \"POST\",\n\t\t\t\t\t\t\t\t\"url\": options.urlLogin\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t.success(\n\t\t\t\t\t\t\t\tfunction (data, textStatus, jqXHR) {\n\t\t\t\t\t\t\t\t\tcookie = readCookie(options.cookiename);\n\t\n\t\t\t\t\t\t\t\t\t$errorMessage.slideUp();\n\t\n\t\t\t\t\t\t\t\t\tif (cookie === null) {\n\t\t\t\t\t\t\t\t\t\tlog(\"login failed. no cookie\", data, textStatus, jqXHR);\n\t\t\t\t\t\t\t\t\t\t$(options.idUsername, form).addClass(\"error\");\n\t\t\t\t\t\t\t\t\t\t$(options.idPassword, form).addClass(\"error\");\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\tlog(\"succesfully logged in\", data, textStatus, jqXHR);\n\t\t\t\t\t\t\t\t\t\t$(options.idLoginLayer).text(options.textLogout);\n\t\t\t\t\t\t\t\t\t\t$(options.idLoginLayer).addClass(\"logged_in\");\n\t\t\t\t\t\t\t\t\t\t$(\"input\", form).removeClass(\"error\");\n\n\t\t\t\t\t\t\t\t\t\tif ($(options.idSaveLogin, form).is(':checked')) {\n\t\t\t\t\t\t\t\t\t\t\tcreateCookieSeconds(\"saveLogin\", \"true\", cookieTimeout);\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\teraseCookie(\"saveLogin\");\n\t\t\t\t\t\t\t\t\t\t\teraseCookie(\"activityWatch\");\n\t\t\t\t\t\t\t\t\t\t\tcreateCookieSeconds(\"activityWatch\", \"active\", 3600);\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t$(options.idUsername, form).val(\"\");\n\t\t\t\t\t\t\t\t\t\t$(options.idPassword, form).val(\"\");\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\t\t_gaq.push(['_setCustomVar', 2, 'Login', 'Ja', 2]);\n\t\t\t\t\t\t\t\t\t\t\t_gaq.push(['_trackPageview']);\n\t\t\t\t\t\t\t\t\t\t} catch(e) {\n\t\t\t\t\t\t\t\t\t\t\tlog(\"ERROR: Google tracking failed in llLogin()\", e);\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\tif (options.redirectAfterLoginUrl !== \"\") {\n\t\t\t\t\t\t\t\t\t\t\tself.location.href = options.redirectAfterLoginUrl;\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\twindow.location.reload();\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t// reinitialize loginBox\n\t\t\t\t\t\t\t\t\t$(options.idLoginForm).llLogin(options);\n\t\t\t\t\t\t\t\t\t$(options.idLoginLayer).llLoginLayer(options);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t.error(\n\t\t\t\t\t\t\t\tfunction (jqXHR, textStatus, errorThrown) {\n\t\t\t\t\t\t\t\t\tlog(\"login failed\", jqXHR, textStatus, errorThrown);\n\n\t\t\t\t\t\t\t\t\tswitch (jqXHR.status) {\n\t\t\t\t\t\t\t\t\t\tcase 403:\n\t\t\t\t\t\t\t\t\t\t\t$errorMessage.html(options.errors.error403);\t// Nicht gefunden\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\tcase 409:\n\t\t\t\t\t\t\t\t\t\t\t$errorMessage.html(options.errors.error409);\t// Account nicht aktiviert\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\tcase 410:\n\t\t\t\t\t\t\t\t\t\t\t$errorMessage.html(options.errors.error410);\t// Gesperrt\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\tcase 500:\n\t\t\t\t\t\t\t\t\t\t\t$errorMessage.html(options.errors.error500);\t// Systemfehler\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t}\n\t\n\t\t\t\t\t\t\t\t\t$errorMessage.slideDown();\n\t\n\t\t\t\t\t\t\t\t\t$(options.idUsername, form).addClass(\"error\");\n\t\t\t\t\t\t\t\t\t$(options.idPassword, form).addClass(\"error\");\n\t\n\t\t\t\t\t\t\t\t\t$(options.idPassword, form).val(\"\");\n\t\n\t\t\t\t\t\t\t\t\t$(options.idLoginForm).llLogin(options);\n\t\t\t\t\t\t\t\t\t$(options.idLoginLayer).llLoginLayer(options);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}); // submit function\n\t\t\t}\n\t\t);\n\t};\n\n\n\t$.fn.llLoginExt = function(opts) {\n\t\treturn this.each(\n\t\t\tfunction () {\n\t\t\t\tvar that = this;\n\t\t\t\tvar options = $.extend({\n\t\t\t\t\t\"cache\": false,\n\t\t\t\t\t\"cookiename\": \"communitycookie\",\n\t\t\t\t\t\"idLoginBox\": LL.defaults.idLoginBox,\n\t\t\t\t\t\"idLoginForm\": LL.defaults.idLoginForm,\n\t\t\t\t\t\"idLoginLayer\": LL.defaults.idLoginLayer,\n\t\t\t\t\t\"idUsername\": LL.defaults.idLoginForm + \"_0\",\n\t\t\t\t\t\"idPassword\": LL.defaults.idLoginForm + \"_1\",\n\t\t\t\t\t\"idSaveLogin\": LL.defaults.idLoginForm + \"_saveLogin\",\n\t\t\t\t\t\"textLogin\": LL.defaults.textLogin,\n\t\t\t\t\t\"textLogout\": LL.defaults.textLogout,\n\t\t\t\t\t\"urlLayer\" : \"\",\n\t\t\t\t\t\"urlLogin\": LL.defaults.extLoginUrl,\n\t\t\t\t\t\"urlLogout\": LL.defaults.urlLogout,\n\t\t\t\t\t\"postLoginAction\" : function () {},\n\t\t\t\t\t\"redirectAfterLoginUrl\": LL.defaults.loginLayerOptions.redirectAfterLoginUrl,\n\t\t\t\t\t\"redirectExtLoginNotFoundUrl\": LL.defaults.loginLayerOptions.redirectExtLoginNotFoundUrl,\n\t\t\t\t\t\"success\" : function () {}\n\t\t\t\t}, opts);\n\n\t\t\t\tvar $errorMessage = $(\".error_message\", this);\n\n\t\t\t\t// check for cookie\n\t\t\t\tvar cookie = readCookie(options.cookiename);\n\n\t\t\t\tif (cookie === null) { // not logged in\n\t\t\t\t\t$(this).slideDown();\n\t\t\t\t}\n\t\t\t\telse { // logged in\n\t\t\t\t\t$(this).slideUp();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tvar form = this;\n\t\t\t\tvar submit = true;\n\t\t\t\tvar cookieTimeout = 10 * 365 * 86400;\t// 10 Jahre in Sekunden\n\n\t\t\t\t$(\"input\", this).removeClass(\"error\");\n\t\t\t\t$errorMessage.html('').hide();\n\n\t\t\t\tif (options.facebookid_externalid === \"\" || options.facebookid_externalid === \"undefined\") {\n\t\t\t\t\tsubmit = false;\n\t\t\t\t\t$errorMessage.append('Die Facebook-Authorisierung ist fehlgeschlagen!');\n\t\t\t\t\t$errorMessage.show();\n\t\t\t\t}\n\n\t\t\t\tvar data = \"externalIdentifierName=facebookid_externalid\";\n\t\t\t\tdata += \"&externalIdentifierValue=\"+options.facebookid_externalid;\n\n\t\t\t\ttry {\n\t\t\t\t\tdata += \"&externalAccessToken=\" + FB.getAuthResponse().accessToken;\n\t\t\t\t} catch (e) {\n\t\t\t\t\tlog(\"ERROR: FB usage in llLoginExt()\", e);\n\t\t\t\t}\n\n\t\t\t\tif (submit) {\n\t\t\t\t\t$.ajax({\n\t\t\t\t\t\t\"cache\": options.cache,\n\t\t\t\t\t\t\"data\": data,\n\t\t\t\t\t\t\"type\": \"POST\",\n\t\t\t\t\t\t\"url\": options.urlLogin,\n\t\t\t\t\t\t\"dataType\": \"json\"\n\t\t\t\t\t})\n\t\t\t\t\t.success(\n\t\t\t\t\t\tfunction(data, textStatus, jqXHR) {\n\t\t\t\t\t\t\tcookie = readCookie(options.cookiename);\n\n\t\t\t\t\t\t\t$errorMessage.slideUp();\n\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tif (cookie === null) {\n\t\t\t\t\t\t\t\t\tlog(\"login failed. no cookie\", data, textStatus, jqXHR);\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tlog(\"succesfully logged in\", data, textStatus, jqXHR);\n\t\t\t\t\t\t\t\t\t$(options.idLoginLayer).text(options.textLogout);\n\t\t\t\t\t\t\t\t\t$(options.idLoginLayer).addClass(\"logged_in\");\n\n\t\t\t\t\t\t\t\t\tif ($(options.idSaveLogin, form).is(':checked')) {\n\t\t\t\t\t\t\t\t\t\tcreateCookieSeconds(\"saveLogin\", \"true\", cookieTimeout);\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\teraseCookie(\"saveLogin\");\n\t\t\t\t\t\t\t\t\t\teraseCookie(\"activityWatch\");\n\t\t\t\t\t\t\t\t\t\tcreateCookieSeconds(\"activityWatch\", \"active\", 3600);\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\tif (typeof options.success === \"function\") {\n\t\t\t\t\t\t\t\t\t\toptions.success();\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\t_gaq.push(['_setCustomVar', 2, 'Login', 'Ja', 2]);\n\t\t\t\t\t\t\t\t\t\t_gaq.push(['_trackPageview']);\n\t\t\t\t\t\t\t\t\t} catch(e) {\n\t\t\t\t\t\t\t\t\t\tlog(\"ERROR: Google pageview tracking failed in llLoginExt()\", e);\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\tif (options.redirectAfterLoginUrl !== \"\") {\n\t\t\t\t\t\t\t\t\t\tself.location.href = options.redirectAfterLoginUrl;\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\twindow.location.reload();\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\toptions.urlLogin = LL.defaults.urlLogin;\n\t\t\t\t\t\t\t\t// reinitialize loginBox\n\t\t\t\t\t\t\t\t$(options.idLoginForm).llLogin(options);\n\t\t\t\t\t\t\t\t$(options.idLoginLayer).llLoginLayer(options);\n\t\t\t\t\t\t\t} catch (facebookLoginException) {\n\t\t\t\t\t\t\t\tlog(\"$.fn.llLoginExt\", this, facebookLoginException);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t)\n\t\t\t\t\t.error(\n\t\t\t\t\t\tfunction(jqXHR, textStatus, errorThrown) {\n\t\t\t\t\t\t\tlog(\"login failed\", jqXHR, textStatus, errorThrown);\n\n\t\t\t\t\t\t\tswitch (jqXHR.status) {\n\t\t\t\t\t\t\t\tcase 403:\n\t\t\t\t\t\t\t\t\t$errorMessage.html(options.errorsFb.error403);\t// Nicht gefunden\n\t\t\t\t\t\t\t\t\tvar url = options.redirectExtLoginNotFoundUrl;\n\t\t\t\t\t\t\t\t\turl += \"?init=true\";\n\t\t\t\t\t\t\t\t\turl += \"&\" + data;\n\t\t\t\t\t\t\t\t\turl += \"&externalServiceName=Facebook\";\n\t\t\t\t\t\t\t\t\turl += \"&externalAccountName=\" + options.facebook_name;\n\t\t\t\t\t\t\t\t\turl += \"&externalAccountLink=\" + options.facebook_link;\n\t\t\t\t\t\t\t\t\turl += \"&email=\" + ((options.facebook_email != undefined) ? options.facebook_email : \"\");\n\t\t\t\t\t\t\t\t\t//url += \"&username=\" + options.facebook_username;\n\t\t\t\t\t\t\t\t\turl += \"&firstname=\" + options.facebook_firstname;\n\t\t\t\t\t\t\t\t\turl += \"&familyname=\" + options.facebook_lastname;\n\t\t\t\t\t\t\t\t\turl += \"&anrede=\" + options.facebook_gender;\n\n\t\t\t\t\t\t\t\t\tif (options.redirectExtLoginNotFoundUrl !== \"\") {\n\t\t\t\t\t\t\t\t\t\tself.location.href = url;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase 409:\n\t\t\t\t\t\t\t\t\t$errorMessage.html(options.errorsFb.error409);\t// Account nicht aktiviert\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase 410:\n\t\t\t\t\t\t\t\t\t$errorMessage.html(options.errorsFb.error410);\t// Gesperrt\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase 500:\n\t\t\t\t\t\t\t\t\t$errorMessage.html(options.errorsFb.error500);\t// Systemfehler\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t$errorMessage.show();\n\n\t\t\t\t\t\t\t$(options.idLoginForm).llLogin(options);\n\t\t\t\t\t\t\t$(options.idLoginLayer).llLoginLayer(options);\n\t\t\t\t\t\t}\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\treturn false;\n\t\t\t}\n\t\t);\n\t};\n\n\n\t$.fn.llLoginLayer = function (opts) {\n\n\t\treturn this.each(\n\t\t\tfunction () {\n\t\t\t\tvar that = this;\n\t\t\t\tvar options = $.extend(LL.defaults.loginLayerOptions, opts);\n\n\t\t\t\t// check for cookie\n\t\t\t\tvar cookie = readCookie(options.cookiename);\n\n\t\t\t\tif (cookie === null) { // not logged in\n\n\t\t\t\t\t$(this).text(options.textLogin);\n\t\t\t\t\t$(this).removeClass(\"logged_in\");\n\n\t\t\t\t\t$(this)\n\t\t\t\t\t\t.unbind(\"click\")\n\t\t\t\t\t\t.click(\n\t\t\t\t\t\t\tfunction (e) {\n\t\t\t\t\t\t\t\te.preventDefault();\n\n\t\t\t\t\t\t\t\tLL.actions.openLoginLayer(that, options);\n\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t_gaq.push(['_trackPageview', '/anmeldung/overlay']);\n\t\t\t\t\t\t\t\t} catch(e) {\n\t\t\t\t\t\t\t\t\tlog(\"ERROR: Google tracking failed in llLoginLayer()\", e);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t);// .click\n\n\t\t\t\t} else { // logged in\n\t\t\t\t\t$(this).text(options.textLogout);\n\t\t\t\t\t$(this).addClass(\"logged_in\");\n\n\t\t\t\t\t$(this)\n\t\t\t\t\t\t.unbind(\"click\")\n\t\t\t\t\t\t.click(\n\t\t\t\t\t\t\tfunction () {\n\t\t\t\t\t\t\t\t// Den Login-Status *vor* dem Logout zurücksetzen:\n\t\t\t\t\t\t\t\tif (typeof options.logoutCallback == \"function\") {\n\t\t\t\t\t\t\t\t\toptions.logoutCallback();\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t$.ajax({\n\t\t\t\t\t\t\t\t\t\"cache\": options.cache,\n\t\t\t\t\t\t\t\t\t\"data\": \"nocache=\"+(Math.random()*100000),\n\t\t\t\t\t\t\t\t\t\"dataType\": \"text\",\n\t\t\t\t\t\t\t\t\t\"type\": \"POST\",\n\t\t\t\t\t\t\t\t\t\"url\": options.urlLogout\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t.success(function(data, textStatus, jqXHR) {\n\t\t\t\t\t\t\t\t\tlog(\"succesfully logged out\", data, textStatus, jqXHR);\n\t\t\t\t\t\t\t\t\teraseCookie(\"saveLogin\");\n\t\t\t\t\t\t\t\t\teraseCookie(\"activityWatch\");\n\t\t\t\t\t\t\t\t\tcookie = readCookie(options.cookiename);\n\t\t\t\t\t\t\t\t\tif (cookie === null) {\n\t\t\t\t\t\t\t\t\t\t$(that).text(options.textLogin);\n\t\t\t\t\t\t\t\t\t\t$(that).removeClass(\"logged_in\");\n\n\t\t\t\t\t\t\t\t\t\t// reinitialize loginBox\n\t\t\t\t\t\t\t\t\t\t$(options.idLoginForm).llLogin(options);\n\t\t\t\t\t\t\t\t\t\t$(options.idLoginLayer).llLoginLayer(options);\n\n\t\t\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\t\t_gaq.push(['_trackPageview', '/anmeldung/overlay']);\n\t\t\t\t\t\t\t\t\t\t} catch(e) {\n\t\t\t\t\t\t\t\t\t\t\tlog(\"ERROR: Google tracking failed in llLoginLayer()\", e);\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\twindow.location.reload();\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t.error(\n\t\t\t\t\t\t\t\t\tfunction (jqXHR, textStatus, errorThrown) {\n\t\t\t\t\t\t\t\t\t\tlog(\"logout failed\", jqXHR, textStatus, errorThrown);\n\n\t\t\t\t\t\t\t\t\t\t$(options.idLoginForm).llLogin(options);\n\t\t\t\t\t\t\t\t\t\t$(options.idLoginLayer).llLoginLayer(options);\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\t\t_gaq.push(['_trackPageview', '/anmeldung/overlay']);\n\t\t\t\t\t\t\t\t\t\t} catch(e) {\n\t\t\t\t\t\t\t\t\t\t\tlog(\"ERROR: Google tracking failed in llLoginLayer()\", e);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\t};\n\n\n\tLL.actions.openLoginLayer = function (domObj, options) {\n\t\tLL.actions.klick_navigation_anmelden_lightbox_open();\n\t\tLL.initFacebookLogin();\n\n\t\t$(\"#layer\").llLayerInject({\n\t\t\t\"callback\": function () {\n\t\t\t\tif (options.focusId) {\n\t\t\t\t\tvar elem = document.getElementById(options.focusId);\n\t\t\t\t\tif (elem) {\n\t\t\t\t\t\telem.focus();\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t$(\"#layer form\")\n\t\t\t\t\t.unbind(\"submit\")\n\t\t\t\t\t.submit(\n\t\t\t\t\t\tfunction () {\n\t\t\t\t\t\t\tvar form = this;\n\t\t\t\t\t\t\tvar data = $(this).serializeArray();\n\t\t\t\t\t\t\tvar submit = true;\n\t\t\t\t\t\t\tvar cookieTimeout = 10 * 365 * 86400;\t// 10 Jahre in Sekunden\n\n\t\t\t\t\t\t\tif ($(options.idSaveLogin, form).is(':checked')) {\n\t\t\t\t\t\t\t\tdata.push({ \"name\": \"cookieTimeout\", \"value\": (cookieTimeout) });\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t$(\"input\", this).removeClass(\"error\");\n\n\t\t\t\t\t\t\tvar $errorLayerMessage = $(\"#login_layer_error\");\n\t\t\t\t\t\t\t$errorLayerMessage.html('').hide();\n\n\t\t\t\t\t\t\tif ($(options.idUsername, this).val() === \"\") {\n\t\t\t\t\t\t\t\t$(options.idUsername, this).addClass(\"error\");\n\t\t\t\t\t\t\t\tsubmit = false;\n\t\t\t\t\t\t\t\t$errorLayerMessage.append('Benutzername / E-Mail darf nicht leer sein!').show();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif ($(options.idPassword, this).val() === \"\") {\n\t\t\t\t\t\t\t\t$(options.idPassword, this).addClass(\"error\");\n\t\t\t\t\t\t\t\tsubmit = false;\n\t\t\t\t\t\t\t\t$errorLayerMessage.append('
Das Passwort darf nicht leer sein!').show();\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif (submit) {\n\t\t\t\t\t\t\t\t$.ajax({\n\t\t\t\t\t\t\t\t\t\"cache\": options.cache,\n\t\t\t\t\t\t\t\t\t\"data\": data,\n\t\t\t\t\t\t\t\t\t\"type\": \"POST\",\n\t\t\t\t\t\t\t\t\t\"url\": options.urlLogin\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t.success(\n\t\t\t\t\t\t\t\t\tfunction (data, textStatus, jqXHR) {\n\t\t\t\t\t\t\t\t\t\tcookie = readCookie(options.cookiename);\n\n\t\t\t\t\t\t\t\t\t\tif (cookie === null) {\n\t\t\t\t\t\t\t\t\t\t\tLL.actions.klick_anmelden_lightbox_senden_fehler();\n\t\t\t\t\t\t\t\t\t\t\tlog(\"login failed. no cookie\", data, textStatus, jqXHR);\n\t\t\t\t\t\t\t\t\t\t\t$(options.idUsername, form).addClass(\"error\");\n\t\t\t\t\t\t\t\t\t\t\t$(options.idPassword, form).addClass(\"error\");\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\t\tLL.actions.klick_anmelden_lightbox_ok_close();\n\t\t\t\t\t\t\t\t\t\t\tlog(\"succesfully logged in\", data, textStatus, jqXHR);\n\t\t\t\t\t\t\t\t\t\t\t$(options.idUsername, form).addClass(\"error\");\n\n\t\t\t\t\t\t\t\t\t\t\tif ($(options.idSaveLogin, form).is(':checked')) {\n\t\t\t\t\t\t\t\t\t\t\t\tcreateCookieSeconds(\"saveLogin\", \"true\", cookieTimeout);\n\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\teraseCookie(\"saveLogin\");\n\t\t\t\t\t\t\t\t\t\t\t\teraseCookie(\"activityWatch\");\n\t\t\t\t\t\t\t\t\t\t\t\tcreateCookieSeconds(\"activityWatch\", \"active\", 3600);\n\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t$(domObj).text(options.textLogout);\n\t\t\t\t\t\t\t\t\t\t\t$(domObj).addClass(\"logged_in\");\n\t\t\t\t\t\t\t\t\t\t\t$(\"input\", form).removeClass(\"error\");\n\t\t\t\t\t\t\t\t\t\t\t$(\"#layer\").fadeOut();\n\n\t\t\t\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\t\t\t_gaq.push(['_setCustomVar', 2, 'Login', 'Ja', 2]);\n\t\t\t\t\t\t\t\t\t\t\t\t_gaq.push(['_trackPageview']);\n\t\t\t\t\t\t\t\t\t\t\t} catch(e) {\n\t\t\t\t\t\t\t\t\t\t\t\tlog(\"ERROR: Google tracking failed in openLoginLayer()\", e);\n\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\toptions.postLoginAction();\n\t\t\t\t\t\t\t\t\t\t\tvar timeout = 1000;\n\t\t\t\t\t\t\t\t\t\t\tif (options.isQuestionAsked === \"true\") {\n\t\t\t\t\t\t\t\t\t\t\t\ttimeout = 0;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\twindow.setTimeout(\n\t\t\t\t\t\t\t\t\t\t\t\tfunction () {\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (options.redirectAfterLoginUrl !== \"\") {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tself.location.href = options.redirectAfterLoginUrl;\n\t\t\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\twindow.location.reload();\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\ttimeout\n\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t// reinitialize loginBox\n\t\t\t\t\t\t\t\t\t\t$(options.idLoginForm).llLogin(options);\n\t\t\t\t\t\t\t\t\t\t$(options.idLoginLayer).llLoginLayer(options);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t.error(\n\t\t\t\t\t\t\t\t\tfunction (jqXHR, textStatus, errorThrown) {\n\t\t\t\t\t\t\t\t\t\tLL.actions.klick_anmelden_lightbox_senden_fehler();\n\t\t\t\t\t\t\t\t\t\tlog(\"login failed\", jqXHR, textStatus, errorThrown);\n\t\t\t\t\t\t\t\t\t\t$(options.idUsername, form).addClass(\"error\");\n\t\t\t\t\t\t\t\t\t\t$(options.idPassword, form).addClass(\"error\");\n\n\t\t\t\t\t\t\t\t\t\tswitch(jqXHR.status) {\n\t\t\t\t\t\t\t\t\t\tcase 403:\n\t\t\t\t\t\t\t\t\t\t\t$errorLayerMessage.html(options.errors.error403).show();\t// Nicht gefunden\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\tcase 409:\n\t\t\t\t\t\t\t\t\t\t\t$errorLayerMessage.html(options.errors.error409).show();\t// Account nicht aktiviert\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\tcase 410:\n\t\t\t\t\t\t\t\t\t\t\t$errorLayerMessage.html(options.errors.error410).show();\t// Gesperrt\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\tcase 500:\n\t\t\t\t\t\t\t\t\t\t\t$errorLayerMessage.html(options.errors.error500).show();\t// Systemfehler\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t$(options.idLoginForm).llLogin(options);\n\t\t\t\t\t\t\t\t\t\t$(options.idLoginLayer).llLoginLayer(options);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t} // if (submit)\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t}\n\t\t\t\t);\n\t\t\t}, // \"callback\": function\n\t\t\t\"closeCallback\": function () {\n\t\t\t\tLL.actions.klick_anmelden_lightbox_manuell_close();\n\t\t\t},\n\t\t\t\"html\": options.html\n\t\t}); // $.llLayerInject\n\n\t\t$('#community_layer_facebook_login').click(function(e) {\n\t\t\tvar that = this;\n\t\t\tvar $div = $(that).closest(\"div.right\");\n\n\t\t\ttry {\n\t\t\t\tFB.login(function(response) {\n\t\t\t\t\tif (response.authResponse) {\n\t\t\t\t\t\tFB.api('/me', function(response) {\n\t\t\t\t\t\t\t// Werte: response.id,.name,.first_name,.last_name,.link,.username,.gender,.locale,.age_range,.email\n\n\t\t\t\t\t\t\tvar loginExtOptions = $.extend(options, {\n\t\t\t\t\t\t\t\t\"facebookid_externalid\": response.id,\n\t\t\t\t\t\t\t\t\"facebook_email\": response.email ? response.email : \"\",\n\t\t\t\t\t\t\t\t\"facebook_username\": response.username,\n\t\t\t\t\t\t\t\t\"facebook_name\": response.name ? response.name :\"\",\n\t\t\t\t\t\t\t\t\"facebook_link\": response.link ? response.link : \"\",\n\t\t\t\t\t\t\t\t\"facebook_firstname\": response.first_name ? response.first_name : \"\",\n\t\t\t\t\t\t\t\t\"facebook_lastname\": response.last_name ? response.last_name : \"\",\n\t\t\t\t\t\t\t\t\"facebook_gender\": response.gender ? response.gender : \"\",\n\t\t\t\t\t\t\t\t\"errorsFb\": {\n\t\t\t\t\t\t\t\t\t\"error403\": \"Unbekannes Facebook-Konto. Weiterleitung zur Registrierung...\",\t// Nicht gefunden\n\t\t\t\t\t\t\t\t\t\"error409\": options.errors.error409,\t// Account nicht aktiviert\n\t\t\t\t\t\t\t\t\t\"error410\": options.errors.error410,\t// Gesperrt\n\t\t\t\t\t\t\t\t\t\"error500\": options.errors.error500\t\t// Systemfehler\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\"success\": function() {\n\t\t\t\t\t\t\t\t\tLL.actions.klick_anmelden_lightbox_ok_close();\n\t\t\t\t\t\t\t\t\t$(\"#layer\").fadeOut();\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\"urlLogin\": LL.defaults.extLoginUrl\n\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\t$div.llLoginExt(loginExtOptions);\n\t\t\t\t\t\t});\n\t\t\t\t\t} else {\n\t\t\t\t\t\tvar error = \"Login fehlgeschlagen.\";\n\t\t\t\t\t\tif (response.status === \"not_authorized\") {\n\t\t\t\t\t\t\terror = \"Der Facebook-Login-Service hat die Anfrage abgelehnt.\";\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\terror = \"Der Facebook-Login-Service ist nicht erreichbar oder wurde abgebrochen.\";\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$(\".error_message\", $div).html(error).show();\n\t\t\t\t\t} \n\t\t\t\t}, {scope: \"email\"});\n\t\t\t} catch (ex) {\n\t\t\t\t// it's just a bug in the facebook API in Internet Explorer 7 to 9\n\t\t\t\tlog(\"LL.actions.openLoginLayer\", this, \"FB-Login-Error: \" + ex);\n\t\t\t}\n\t\t\te.stopPropagation();\n\t\t\treturn false;\n\t\t});\n\t};\n\n\n\t$.fn.llMedSearchPaging = function(opts) {\n\t\tvar options = $.extend({\n\t\t\t\"limit\": 25,\n\t\t\t\"pagingDivId\": \"#medicine_paging\"\n\t\t}, opts);\n\n\t\treturn this.each(function() {\n\t\t\tvar that = this;\n\n\t\t\tvar $list = $(\"ul.list\", this);\n\t\t\tvar $listElements = $(\"ul.list > li\", this);\n\t\t\tvar $paging = $(options.pagingDivId);\n\t\t\tvar activePagingGroupIndex = 0;\n\n\t\t\t// paginate text\n\t\t\tvar listSize = $listElements.size();\n\t\t\tvar pagingGroups = [];\n\t\t\tvar pagingGroupsLength = 0;\n\t\t\tvar pagingGroupIndex = 0;\n\t\t\tvar count = 0;\n\n\t\t\t// break if there ain't enough content for paging\n\t\t\tif (listSize <= options.limit) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$listElements.each(function(index, element) {\n\t\t\t\tvar $element = $(element);\n\n\t\t\t\tif (count >= options.limit) {\n\t\t\t\t\tpagingGroupIndex += 1;\n\t\t\t\t\tcount = 0;\n\t\t\t\t}\n\n\t\t\t\t// open up new paging group if empty\n\t\t\t\tif (count == 0) {\n\t\t\t\t\tpagingGroups[pagingGroupIndex] = $(\"
\");\n\t\t\t\tpagingSkel.push(\" 0 ? \" prev_active\" : \"\") +\"\\\" href=\\\"#\"+that.id+\"\\\" title=\\\"vorherige Seite\\\">zurück\");\n\t\t\t\tpagingSkel.push(\"\");\n\t\t\t\tfor(var i = 0; i < pagingGroupsLength; i+=1) {\n\t\t\t\t\tif (i < 3 || i >= pagingGroupsLength-3 || i === activePagingGroupIndex-1 || i === activePagingGroupIndex || i === activePagingGroupIndex+1) {\n\t\t\t\t\t\tpagingSkel.push(\"\" + (i+1) + \"\");\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tif (i < activePagingGroupIndex && gapSetPrevious === false) {\n\t\t\t\t\t\t\tpagingSkel.push(\" ... \");\n\t\t\t\t\t\t\tgapSetPrevious = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (i > activePagingGroupIndex && gapSetAfter === false) {\n\t\t\t\t\t\t\tpagingSkel.push(\" ... \");\n\t\t\t\t\t\t\tgapSetAfter = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tpagingSkel.push(\"\");\n\t\t\t\tpagingSkel.push(\"nächste Seite\");\n\t\t\t\tpagingSkel.push(\"
');\n\t\t\t\tpagingSkel.push(' 0 ? ' prev_active' : '') + '\" href=\"?page=' + (prevIndex + 1) + '#pagingTop\" title=\"vorherige Seite\">zurück');\n\t\t\t\tpagingSkel.push('');\n\n\t\t\t\tfor (var i = 0; i < pagingGroupsLength; i+=1) {\n\t\t\t\t\tif (i < 3 || i >= pagingGroupsLength-3 || i === activePagingGroupIndex-1 || i === activePagingGroupIndex || i === activePagingGroupIndex+1) {\n\t\t\t\t\t\tpagingSkel.push('' + (i+1) + '');\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tif (i < activePagingGroupIndex && gapSetPrevious === false) {\n\t\t\t\t\t\t\tpagingSkel.push(' ... ');\n\t\t\t\t\t\t\tgapSetPrevious = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (i > activePagingGroupIndex && gapSetAfter === false) {\n\t\t\t\t\t\t\tpagingSkel.push(' ... ');\n\t\t\t\t\t\t\tgapSetAfter = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tpagingSkel.push('');\n\t\t\t\tpagingSkel.push('nächste Seite');\n\t\t\t\tpagingSkel.push('
\");\n\t\t\t\tpagingSkel.push(\" 0 ? \" prev_active\" : \"\") +\"\\\" href=\\\"#\\\" title=\\\"vorherige Seite\\\">zurück\");\n\t\t\t\tpagingSkel.push(\"\");\n\t\t\t\tfor(var i = 0; i < pagingGroupsLength; i+=1) {\n\t\t\t\t\tif (i < 3 || i >= pagingGroupsLength-3 || i === activePagingGroupIndex-1 || i === activePagingGroupIndex || i === activePagingGroupIndex+1) {\n\t\t\t\t\t\tpagingSkel.push(\"\" + (i+1) + \"\");\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tif (i < activePagingGroupIndex && gapSetPrevious === false) {\n\t\t\t\t\t\t\tpagingSkel.push(\" ... \");\n\t\t\t\t\t\t\tgapSetPrevious = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (i > activePagingGroupIndex && gapSetAfter === false) {\n\t\t\t\t\t\t\tpagingSkel.push(\" ... \");\n\t\t\t\t\t\t\tgapSetAfter = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tpagingSkel.push(\"\");\n\t\t\t\tpagingSkel.push(\"nächste Seite\");\n\t\t\t\tpagingSkel.push(\"
\");\n\n\t\t\t\t$pagingSkel = $(pagingSkel.join(\"\"));\n\n\t\t\t\t// add events\n\t\t\t\t$pagingSkel\n\t\t\t\t\t.find(\".next\")\n\t\t\t\t\t.click(function(e) {\n\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\tif (!$(this).hasClass(\"next_active\")) { return; }\n\t\t\t\t\t\tactivePagingGroupIndex += 1;\n\t\t\t\t\t\tgotoPage();\n\t\t\t\t\t\tbuildPaging();\n\t\t\t\t\t});\n\n\t\t\t\t$pagingSkel\n\t\t\t\t\t.find(\".previous\")\n\t\t\t\t\t.click(function(e) {\n\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\tif (!$(this).hasClass(\"prev_active\")) { return; }\n\t\t\t\t\t\tactivePagingGroupIndex -= 1;\n\t\t\t\t\t\tgotoPage();\n\t\t\t\t\t\tbuildPaging();\n\t\t\t\t\t});\n\n\t\t\t\t$pagingSkel\n\t\t\t\t\t.find(\"a.btn\")\n\t\t\t\t\t.click(function(e) {\n\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\tactivePagingGroupIndex = parseInt($(this).text())-1;\n\t\t\t\t\t\tgotoPage();\n\t\t\t\t\t\tbuildPaging();\n\t\t\t\t\t});\n\n\t\t\t\t$paging.html($pagingSkel);\n\t\t\t};\n\t\t\tbuildPaging();\n\n\t\t});\n\t};\n\n\n\t$.fn.ll_pollLayer = function(opts) {\n\t\tvar widgetDiv = opts;\n\t\t\n\t\tvar options = $.extend({\n\t\t}, opts);\n\t\t\n\t\treturn this.each(function() {\n\t\t\tvar $that = $(this);\n\t\t\tvar $form = $(\"form\", this);\n\n\t\t\t$form.live(\"submit\", function() {\n\t\t\t\tvar formData = $(this).serializeArray();\n\t\t\t\tvar postUrl = $(this).attr(\"action\");\n\t\t\t\t$.ajax({\n\t\t\t\t\t\"cache\": false,\n\t\t\t\t\tdata: formData,\n\t\t\t\t\ttype: \"POST\",\n\t\t\t\t\turl: postUrl\n\t\t\t\t})\n\t\t\t\t.success(function(data, textStatus, jqXHR) {\n\t\t\t\t\t$(\"#\"+widgetDiv).hide();\n\t\t\t\t\t\n\t\t\t\t\t$(\"#\"+widgetDiv+'_r')\n\t\t\t\t\t\t.html(data)\n\t\t\t\t\t\t.show();\n\n\t\t\t\t\t$(\"#\"+widgetDiv+'_r')\n\t\t\t\t\t\t.find(\".close\")\n\t\t\t\t\t\t.live(\"click\", function() {\n\t\t\t\t\t\t\t$(\"#\"+widgetDiv+'_r').hide();\n\t\t\t\t\t\t});\n\n\t\t\t\t\tLL.actions.klick(\"klick_voting_submit\");\n\n\t\t\t\t\treturn false;\n\t\t\t\t})\n\t\t\t\t.error(function(jqXHR, textStatus, errorThrown) {\n\t\t\t\t\tlog(jqXHR, textStatus, errorThrown);\n\t\t\t\t});\n\n\t\t\t\treturn false;\n\t\t\t});\n\t\t});\n\t};\n\n\t\n\t$.fn.llQuestion = function() {\n\t\treturn this.each(function() {\n\t\t\tvar $prev = $(\".prev\", this);\n\t\t\tvar $next = $(\".next\", this);\n\t\t\tvar $lists = $(\".list\", this);\n\t\t\tvar listCount = $(\".list\", this).size();\n\t\t\tvar index = 0;\n\n\t\t\t$prev.live(\"click\", function(e) {\n\t\t\t\te.preventDefault();\n\t\t\t\tLL.actions.klick_f_a_box_pfeil_zurueck();\n\n\t\t\t\tindex -= 1;\n\n\t\t\t\t$lists\n\t\t\t\t\t.hide()\n\t\t\t\t\t.eq(index)\n\t\t\t\t\t.show();\n\n\t\t\t\tindex >= listCount-1 ?\n\t\t\t\t\t$next.hide():\n\t\t\t\t\t$next.show();\n\n\t\t\t\tindex <= 0 ?\n\t\t\t\t\t$prev.hide():\n\t\t\t\t\t$prev.show();\n\t\t\t});\n\n\t\t\t$next.live(\"click\", function(e) {\n\t\t\t\te.preventDefault();\n\t\t\t\tLL.actions.klick_f_a_box_pfeil_vor();\n\n\t\t\t\tindex += 1;\n\n\t\t\t\t$lists\n\t\t\t\t\t.hide()\n\t\t\t\t\t.eq(index)\n\t\t\t\t\t.show();\n\n\t\t\t\tindex >= listCount-1 ?\n\t\t\t\t\t$next.hide():\n\t\t\t\t\t$next.show();\n\n\t\t\t\tindex <= 0 ?\n\t\t\t\t\t$prev.hide():\n\t\t\t\t\t$prev.show();\n\t\t\t});\n\n\t\t\t$next.show();\n\t\t});\n\t};\n\n\n\t$.fn.llRate = function() {\n\t\treturn this.each(function() {\n\t\t\tvar $form = $(\"form\", this),\n\t\t\t\t$submit = $(\".ratingbtn\", this),\n\t\t\t\t$badge = $(\".badge\", this);\n\n\t\t\tfunction updateRating(data) {\n\t\t\t\t$.ajax({\n\t\t\t\t\t\"cache\": false,\n\t\t\t\t\t\"data\": data,\n\t\t\t\t\t\"type\": $form.prop(\"method\"),\n\t\t\t\t\t\"url\": $form.prop(\"action\")\n\t\t\t\t})\n\t\t\t\t.success(function(data, textStatus, jqXHR) {\n\t\t\t\t\t// write respone into badge and show no. of votes\n\t\t\t\t\t$badge.html(data);\n\t\t\t\t})\n\t\t\t\t.error(function(jqXHR, textStatus, errorThrown) {\n\t\t\t\t\t// error\n\t\t\t\t\tlog(\"$.fn.llRate\", this, jqXHR, textStatus, errorThrown);\n\t\t\t\t});\n\t\t\t}\n\n\t\t\t$form\n\t\t\t\t.submit(function(e) {\n\t\t\t\t\te.preventDefault();\n\n\t\t\t\t\t// disable submit button\n\t\t\t\t\t$submit.prop(\"disabled\", true);\n\t\t\t\t\t$submit.addClass(\"disabled\");\n\n\t\t\t\t\t// send vote\n\t\t\t\t\tvar data = $(this).serializeArray();\n\t\t\t\t\tupdateRating(data);\n\t\t\t\t});\n\n\t\t\t// init (w/o data)\n\t\t\tupdateRating();\n\t\t});\n\t};\n\n\n\t$.fn.llIndexBox = function() {\n\t\treturn this.each(function() {\n\t\t\tvar $more = $(\".more\", this);\n\t\t\tvar $less = $(\".less\", this);\n\t\t\tvar $li = $(\"li.hide\", this);\n\n\t\t\t$more\n\t\t\t\t.click(function(e) {\n\t\t\t\t\te.preventDefault();\n\t\t\t\t\t$more.hide();\n\t\t\t\t\t$less.show();\n\t\t\t\t\t$li.show();\n\t\t\t\t});\n\n\t\t\t$less\n\t\t\t\t.click(function(e) {\n\t\t\t\t\te.preventDefault();\n\t\t\t\t\t$less.hide();\n\t\t\t\t\t$more.show();\n\t\t\t\t\t$li.hide();\n\t\t\t\t});\n\t\t});\n\t};\n\n\n\t$.fn.llSearchLayer = function( options ) {\n\t\tvar opts = $.extend({\n\t\t\t\"url\": null,\n\t\t\t\"defaultValue\": \"\"\n\t\t}, options);\n\t\treturn this.each(function() {\n\t\t\tvar $form = $(this);\n\t\t\tvar $input = $(\".text\", this);\n\t\t\tvar $layer = $(\".suggest\", this);\n\n\t\t\tvar sending = false;\n\t\t\tvar layerIndex;\n\t\t\tvar value = $input.val();\n\n\t\t\t$form.attr(\"autocomplete\", \"off\");\n\t\t\t$input.attr(\"autocomplete\", \"off\");\n\n\t\t\t// Den Standardtext beim ersten Fokussieren entfernen und die Farbe anpassen:\n\t\t\t$input.focus(function(e) {\n\t\t\t\tif ($input.val() == opts.defaultValue) {\n\t\t\t\t\t$input.val(\"\");\n\t\t\t\t\t$input.removeClass(\"default\");\n\t\t\t\t}\n\t\t\t});\n\n\t\t\t// Autocomplete-Layer ausblenden, wenn man woanders auf die Seite klickt. Da das Text-\n\t\t\t// feld aber auch beim Klick auf einen Autocomplete-Eintrag den Focus verliert, einen\n\t\t\t// kleinen Moment warten, bevor man es ausblendet.\n\t\t\t$input.blur(function(e) {\n\t\t\t\tvar hideTimer = null;\n\t\t\t\twindow.clearTimeout(hideTimer);\n\t\t\t\thideTimer = window.setTimeout(function() {\n\t\t\t\t\t$layer.html(\"\").hide();\n\t\t\t\t}, 300);\n\t\t\t});\n\n\t\t\t$form.submit(function(e) {\n\t\t\t\tif ($input.val() == opts.defaultValue) {\n\t\t\t\t\t$input.val(\"\");\n\t\t\t\t\t$input.removeClass(\"default\");\n\t\t\t\t}\n\t\t\t});\n\n\t\t\t$form.keyup(function(e) {\n\t\t\t\tvar inputLength = $input.val().length;\n\n\t\t\t\t// escape\n\t\t\t\tif ( e.keyCode === 27) {\n\t\t\t\t\t$layer\n\t\t\t\t\t\t.html(\"\")\n\t\t\t\t\t\t.hide();\n\n\t\t\t\t\tlayerIndex = undefined;\n\n\t\t\t\t\t$input.text( $input.val() );\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// up\n\t\t\t\tif ( e.keyCode === 38 ) {\n\t\t\t\t\tvar $results = $layer.find(\"li li\");\n\t\t\t\t\tvar resultCount = $results.size();\n\n\t\t\t\t\tlayerIndex == undefined ? layerIndex = resultCount - 1 : layerIndex = getIndex( layerIndex - 1, resultCount );\n\n\t\t\t\t\t$results\n\t\t\t\t\t\t.removeClass(\"active\")\n\t\t\t\t\t\t.eq( layerIndex )\n\t\t\t\t\t\t.addClass(\"active\");\n\n\t\t\t\t\t$input.val( $results.eq( layerIndex ).find(\".term\").text() );\n\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// down\n\t\t\t\tif ( e.keyCode === 40 ) {\n\t\t\t\t\tvar $results = $layer.find(\"li li\");\n\t\t\t\t\tvar resultCount = $results.size();\n\n\t\t\t\t\tlayerIndex == undefined ? layerIndex = 0 : layerIndex = getIndex( layerIndex + 1, resultCount );\n\n\t\t\t\t\t$results\n\t\t\t\t\t\t.removeClass(\"active\")\n\t\t\t\t\t\t.eq( layerIndex )\n\t\t\t\t\t\t.addClass(\"active\");\n\n\t\t\t\t\t$input.val( $results.eq( layerIndex ).find(\".term\").text() );\n\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// enter\n\t\t\t\tif ( e.keyCode === 13 && layerIndex != undefined ) { // enter\n\t\t\t\t\tvar $results = $layer.find(\"li li\");\n\t\t\t\t\t$input.val( $results.eq( layerIndex ).find(\".term\").text() );\n\n\t\t\t\t\t$layer\n\t\t\t\t\t\t.html(\"\")\n\t\t\t\t\t\t.hide();\n\t\t\t\t\tlayerIndex = undefined;\n\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\telse if ( e.keyCode === 13 ) {\n\t\t\t\t\t$layer\n\t\t\t\t\t\t.html(\"\")\n\t\t\t\t\t\t.hide();\n\n\t\t\t\t\tlayerIndex = undefined;\n\n\t\t\t\t\t$form.submit();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\n\t\t\t\tif ( inputLength >= 2 && sending === false && value !== $input.val() ) {\n\t\t\t\t\tvalue = $input.val();\n\t\t\t\t\tsending = true;\n\t\t\t\t\tinputLengthSent = inputLength;\n\n\t\t\t\t\t$.ajax({\n\t\t\t\t\t\t\"url\": opts.url,\n\t\t\t\t\t\t\"data\": {\n\t\t\t\t\t\t\t\"search\": value\n\t\t\t\t\t\t}\n\t\t\t\t\t})\n\t\t\t\t\t.success(function(data, textStatus, jqXHR) {\n\t\t\t\t\t\tif ( $(data).size() !== 0 ) {\n\t\t\t\t\t\t$layer\n\t\t\t\t\t\t\t.html( data )\n\t\t\t\t\t\t\t.show();\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t$layer\n\t\t\t\t\t\t\t\t.html(\"\")\n\t\t\t\t\t\t\t\t.hide();\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tlayerIndex = undefined;\n\t\t\t\t\t\tsending = false;\n\n\t\t\t\t\t\tif (\tinputLength !== inputLengthSent ) {\n\t\t\t\t\t\t\t$input.trigger(\"keyup\");\n\t\t\t\t\t\t}\n\t\t\t\t\t})\n\t\t\t\t\t.error(function(jqXHR, textStatus, errorThrown) {\n\t\t\t\t\t\tlog(jqXHR, textStatus, errorThrown);\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t});\n\n\t\t});\n\t};\n\n\n\t$.fn.llSelftestAnswers = function() {\n\t\treturn this.each(function() {\n\t\t\tvar $input = $(\"input\", this);\n\t\t\tvar $answerDesc = $(\".answer_desc\", this);\n\t\t\tvar that = this;\n\n\t\t\t$input.click(function() {\n\t\t\t\t$answerDesc.each(function() {\n\t\t\t\t\tvar id = $(this).attr(\"id\").replace(\"_desc\", \"\");\n\t\t\t\t\tvar $answer = $(\"#\" + id, that);\n\n\t\t\t\t\tif ($answer.is(':checked')) {\n\t\t\t\t\t\t$(this).show();\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$(this).hide();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t});\n\t\t});\n\t};\n\n\n\t$.fn.llShortcuts = function(opts) {\n\t\tvar options = $.extend({\n\t\t\t\"duration\": 500\n\t\t}, opts);\n\n\t\treturn this.each(function() {\n\t\t\tvar $hl = $(\".hl\", this);\n\t\t\tvar $lists = $(\".list\", this);\n\t\t\tvar count = $lists.size();\n\n\t\t\t$hl\n\t\t\t\t.css(\"cursor\", \"pointer\")\n\t\t\t\t.click(function(e) {\n\t\t\t\t\te.preventDefault();\n\n\t\t\t\t\tvar that = this;\n\n\t\t\t\t\t$hl\n\t\t\t\t\t\t.not(this)\n\t\t\t\t\t\t.each(function() {\n\t\t\t\t\t\t\tvar $list = $(this).siblings(\".ilist\");\n\t\t\t\t\t\t\tvar $parent = $(this).closest(\".list\");\n\n\t\t\t\t\t\t\t$list.slideUp(\n\t\t\t\t\t\t\t\toptions.duration,\n\t\t\t\t\t\t\t\tfunction() {\n\t\t\t\t\t\t\t\t\t$parent.removeClass(\"active\");\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t});\n\n\t\t\t\t\t$(this)\n\t\t\t\t\t\t.each(function() {\n\t\t\t\t\t\t\tvar $list = $(this).siblings(\".ilist\");\n\t\t\t\t\t\t\tvar $parent = $(this).closest(\".list\");\n\n\t\t\t\t\t\t\t$list.slideDown(\n\t\t\t\t\t\t\t\toptions.duration,\n\t\t\t\t\t\t\t\tfunction() {\n\t\t\t\t\t\t\t\t\t$parent.addClass(\"active\");\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t});\n\t\t\t\t});\n\t\t});\n\t};\n\n\n\t$.fn.llSitemapToggle = function() {\n\t\treturn this.each(function() {\n\t\t\tvar that = this;\n\n\t\t\t$(\"li.sub > a\", this).click(\n\t\t\t\t\tfunction() {\n\t\t\t\t\t\tif ($(this).next(\".toggle\").is(\":hidden\")) {\n\t\t\t\t\t\t\t// open\n\t\t\t\t\t\t\tif ($(this).closest(\"li\").hasClass(\"fl\")) {\n\t\t\t\t\t\t\t\t$(\".fl.open\", that)\n\t\t\t\t\t\t\t\t\t.removeClass(\"open\")\n\t\t\t\t\t\t\t\t\t.children(\".toggle:first\")\n\t\t\t\t\t\t\t\t\t.slideUp();\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t$(this)\n\t\t\t\t\t\t\t\t.closest(\"li\")\n\t\t\t\t\t\t\t\t.addClass(\"open\")\n\t\t\t\t\t\t\t\t.end()\n\t\t\t\t\t\t\t\t.next(\".toggle\")\n\t\t\t\t\t\t\t\t.slideDown();\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t// close\n\t\t\t\t\t\t\t$(this)\n\t\t\t\t\t\t\t\t.next(\".toggle\")\n\t\t\t\t\t\t\t\t.slideUp()\n\t\t\t\t\t\t\t\t.end()\n\t\t\t\t\t\t\t\t.closest(\"li\")\n\t\t\t\t\t\t\t\t.removeClass(\"open\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t});\n\t\t});\n\t};\n\n\n\t$.fn.llNavboxToggle = function() {\n\t\treturn this.each(function() {\n\n\t\t\t// click on list item\n\t\t\t$(\"li.sub\", this)\n\t\t\t\t.click(function( e ) {\n\t\t\t\t\t// stop bubbling up the DOM\n\t\t\t\t\te.stopPropagation();\n\n\t\t\t\t\t// get click position\n\t\t\t\t\tvar x = e.pageX - $(this).offset().left;\n\t\t\t\t\tvar y = e.pageY - $(this).offset().top;\n\n\t\t\t\t\t// if not above + or - return here\n\t\t\t\t\tif (x < 0 || x > 24 || y < 0 || y > 35) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\t// open or close the sublist for the clicked element\n\t\t\t\t\tif ( $(this).hasClass(\"open\") ) {\t// close\n\t\t\t\t\t\t// change icon\n\t\t\t\t\t\t$(this)\n\t\t\t\t\t\t\t.removeClass(\"open\");\n\n\t\t\t\t\t\t// close sublist\n\t\t\t\t\t\t$(\"> .toggle\", this)\n\t\t\t\t\t\t\t.slideUp(function() {\n\t\t\t\t\t\t\t\t// close all child-sublists and change icon to closed\n\t\t\t\t\t\t\t\t$(\".toggle\", this)\n\t\t\t\t\t\t\t\t\t.hide();\n\t\t\t\t\t\t\t\t$(\".open\", this)\n\t\t\t\t\t\t\t\t\t.removeClass(\"open\");\n\t\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t\telse {\t\t\t\t\t\t\t\t// open\n\t\t\t\t\t\t// change icon\n\t\t\t\t\t\t$(this)\n\t\t\t\t\t\t\t.addClass(\"open\");\n\n\t\t\t\t\t\t// open sublist\n\t\t\t\t\t\t$(\"> .toggle\", this)\n\t\t\t\t\t\t\t.slideDown();\n\n\t\t\t\t\t\t// get all lists on the same layer and close them and their sublists\n\t\t\t\t\t\t$(this)\n\t\t\t\t\t\t\t.siblings()\n\t\t\t\t\t\t\t.removeClass(\"open\")\n\t\t\t\t\t\t\t.find(\"> .toggle\")\n\t\t\t\t\t\t\t.slideUp(function() {\n\t\t\t\t\t\t\t\t// close all child-sublists and change icon to closed\n\t\t\t\t\t\t\t\t$(\".toggle\", this)\n\t\t\t\t\t\t\t\t\t.hide();\n\t\t\t\t\t\t\t\t$(\".open\", this)\n\t\t\t\t\t\t\t\t\t.removeClass(\"open\");\n\t\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t});\n\t};\n\n\n\t$.fn.llSlideShow = function(opts) {\n\t\tvar options = $.extend({\n\t\t\t\"duration\": 500\n\t\t}, opts);\n\n\t\treturn this.each(function() {\n\t\t\tvar that = this;\n\t\t\tvar $wrapper = $(\".wrapper\", this);\n\t\t\tvar $list = $(\".list\", this);\n\t\t\tvar $prev = $(\".prev\", this);\n\t\t\tvar $next = $(\".next\", this);\n\t\t\tvar $images = $(\".list img\", this);\n\t\t\tvar $counter = $(\".counter .idx\", this);\n\n\t\t\tvar index = 0;\n\t\t\tvar elementCount = $(\".list li\", this).size();\n\t\t\tvar elementWidth = 510;\n\n\t\t\tvar headline = $(\".hd\", this).text();\n\n\t\t\t$(\".control\", this).show();\n\n\t\t\tvar slide = function(idx, callback) {\n\t\t\t\tvar offsetLeft = -5 - ((idx) * elementWidth);\n\n\t\t\t\t$counter.text(getIndex(idx, elementCount)+1);\n\n\t\t\t\t$( \".list\", that )\n\t\t\t\t\t.animate({\n\t\t\t\t\t\t\"margin-left\": offsetLeft\n\t\t\t\t\t}, function() {\n\t\t\t\t\t\tif (typeof callback === \"function\") {\n\t\t\t\t\t\t\tcallback.call();\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t};\n\n\t\t\tvar prev = function() {\n\t\t\t\tindex -= 1;\n\n\t\t\t\tif (index < 0) {\n\t\t\t\t\t// duplicate & position\n\t\t\t\t\tvar offset = -(elementCount * elementWidth)-5;\n\n\t\t\t\t\t$list\n\t\t\t\t\t\t.find(\"li\")\n\t\t\t\t\t\t.clone(true, true)\n\t\t\t\t\t\t.prependTo($list);\n\t\t\t\t\t$list.css(\"margin-left\", offset);\n\n\t\t\t\t\tslide(getIndex(index, elementCount), function() {\n\t\t\t\t\t\t$list\n\t\t\t\t\t\t\t.find(\"li:gt(\"+ (elementCount-1) +\")\")\n\t\t\t\t\t\t\t.remove();\n\t\t\t\t\t\tindex = getIndex(index, elementCount);\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tslide(index);\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tvar next = function() {\n\t\t\t\tindex += 1;\n\n\t\t\t\tif (index >= elementCount) {\n\t\t\t\t\t// duplicate & position\n\t\t\t\t\t$list\n\t\t\t\t\t\t.find(\"li\")\n\t\t\t\t\t\t.clone(true, true)\n\t\t\t\t\t\t.appendTo($list);\n\n\t\t\t\t\tslide(index, function() {\n\t\t\t\t\t\t$list\n\t\t\t\t\t\t\t.find(\"li:lt(\"+ elementCount +\")\")\n\t\t\t\t\t\t\t.remove()\n\t\t\t\t\t\t\t.end()\n\t\t\t\t\t\t\t.css(\"margin-left\", \"-5px\");\n\n\t\t\t\t\t\tindex = getIndex(index, elementCount);\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tslide(index);\n\t\t\t\t}\n\t\t\t};\n\n\t\t\t$(this)\n\t\t\t\t.on(\"click\", \".prev\", function() {\n\t\t\t\t\tprev();\n\t\t\t\t\tLL.actions.klick_fotostrecke_zurueck({\n\t\t\t\t\t\t\"headline\": headline,\n\t\t\t\t\t\t\"trigger\": \"pfeil_button\"\n\t\t\t\t\t});\n\t\t\t\t});\n\n\t\t\t$(this)\n\t\t\t\t.on(\"click\", \".next\", function() {\n\t\t\t\t\tnext();\n\t\t\t\t\tLL.actions.klick_fotostrecke_vor({\n\t\t\t\t\t\t\"headline\": headline,\n\t\t\t\t\t\t\"trigger\": \"pfeil_button\"\n\t\t\t\t\t});\n\t\t\t\t});\n\n\t\t\t$(document).keyup(function(e) {\n\t\t\t\tswitch(e.keyCode) {\n\t\t\t\t\tcase 37:\n\t\t\t\t\t\tprev();\n\t\t\t\t\t\tLL.actions.klick_fotostrecke_zurueck({\n\t\t\t\t\t\t\t\"headline\": headline,\n\t\t\t\t\t\t\t\"trigger\": \"keypress\"\n\t\t\t\t\t\t});\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 39:\n\t\t\t\t\t\tnext();\n\t\t\t\t\t\tLL.actions.klick_fotostrecke_vor({\n\t\t\t\t\t\t\t\"headline\": headline,\n\t\t\t\t\t\t\t\"trigger\": \"keypress\"\n\t\t\t\t\t\t});\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t});\n\n\t\t\t$images\n\t\t\t\t.css(\"cursor\", \"pointer\")\n\t\t\t\t.click(function(e) {\n\t\t\t\t\tvar relativeX = e.pageX - $(this).offset().left;\n\t\t\t\t\tif (relativeX <= 250) {\n\t\t\t\t\t\tprev();\n\t\t\t\t\t\tLL.actions.klick_fotostrecke_zurueck({\n\t\t\t\t\t\t\t\"headline\": headline,\n\t\t\t\t\t\t\t\"trigger\": \"sensitive_area\"\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tnext();\n\t\t\t\t\t\tLL.actions.klick_fotostrecke_vor({\n\t\t\t\t\t\t\t\"headline\": headline,\n\t\t\t\t\t\t\t\"trigger\": \"sensitive_area\"\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t});\n\t};\n\n\n\t$.fn.llTabs = function() {\n\t\treturn this.each(function() {\n\t\t\tvar $tabs = $(\".tabs li\", this);\n\t\t\tvar $tabLinks = $(\".tabs a\", this);\n\n\t\t\t// set active state and show corresponding content\n\t\t\t$tabLinks.click(function() {\n\n\t\t\t\tvar idx = $tabLinks.index(this);\n\n\t\t\t\t// return if this tab is already active\n\t\t\t\tif ($tabs.eq(idx).hasClass(\"active\")) { return false; }\n\n\t\t\t\t// remove active states of all tabs, then set clicked active.\n\t\t\t\t$tabs\n\t\t\t\t\t.removeClass(\"active\")\n\t\t\t\t\t.eq(idx)\n\t\t\t\t\t.addClass(\"active\");\n\n\t\t\t\treturn false;\n\t\t\t});\n\t\t});\n\t};\n\n\n\t$.fn.llTeaserTab = function( options ) {\n\t\tvar opts = $.extend({\n\t\t\t\"klick_function\": LL.actions.klick_teaser_reiter\n\t\t}, options);\n\n\t\treturn this.each(function() {\n\t\t\tvar $tabs = $(\".tabs a\", this);\n\t\t\tvar $teasers = $(\".mod_tab\", this);\n\n\t\t\t$tabs.click(function() {\n\t\t\t\tvar idx = $tabs.index(this);\n\n\t\t\t\t$tabs.removeClass(\"active\");\n\t\t\t\t$(this).addClass(\"active\");\n\t\t\t\tif (typeof opts.klick_function == \"function\") {\n\t\t\t\t\topts.klick_function( { button_name: $(this).text() } );\n\t\t\t\t}\n\n\t\t\t\t$teasers.removeClass(\"active\");\n\t\t\t\t$teasers.eq(idx).addClass(\"active\");\n\n\t\t\t\treturn false;\n\t\t\t});\n\t\t});\n\t};\n\n\n\t$.fn.llTopTopics = function( options ) {\n\t\treturn this.each(function() {\n\n\t\t\t// switch to zoom if option is set\n\t\t\tif ( options.zoom ) {\n\t\t\t\t$(this).llTopTopicsZoom( options );\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvar opts = $.extend({\n\t\t\t\t\"slideDuration\": 700,\n\t\t\t\t\"imgWidth\": 520,\n\t\t\t\t\"interval\": 5000,\n\t\t\t\t\"length\": 1,\n\t\t\t\t\"unitWidth\": 364\n\t\t\t}, options);\n\n\t\t\tvar index = 0;\n\t\t\tvar interval;\n\t\t\tvar that = this;\n\t\t\tvar $controls = $(\".prev, .next\", this);\n\t\t\tvar $prev = $(\".prev\", this);\n\t\t\tvar $next = $(\".next\", this);\n\t\t\tvar $sliderImg = $(\".slider_img .slide_cont\", this);\n\t\t\tvar $sliderTxt = $(\".slider_txt .slide_cont\", this);\n\t\t\tvar $txts = $(\".unit\", this);\n\n\t\t\tvar resizeImages = function () {\n\t\t\t\topts.imgWidth = $(that).width();\n\t\t\t\t$(\"img\", $sliderImg).css(\"width\", opts.imgWidth + \"px\");\n\t\t\t\t$sliderImg.css(\"width\", opts.length * opts.imgWidth);\n\t\t\t\t$sliderTxt.css(\"width\", opts.length * opts.unitWidth);\n\t\t\t};\n\n\t\t\tvar resizeControls = function() {\n\t\t\t\tvar height = $txts.eq(index).outerHeight(false);\n\n\t\t\t\t$controls\n\t\t\t\t\t.height(height)\n\t\t\t\t\t.find(\"a\")\n\t\t\t\t\t.css({\n\t\t\t\t\t\t\"margin-top\": height / 2 - 18\n\t\t\t\t\t});\n\t\t\t};\n\n\t\t\tvar prev = function() {\n\t\t\t\t// img animation\n\t\t\t\tvar $lastImg = $(\".slider_img .img\", that).last().detach();\n\t\t\t\t$sliderImg\n\t\t\t\t\t.css({\n\t\t\t\t\t\t\"left\": \"-\"+opts.imgWidth+\"px\"\n\t\t\t\t\t})\n\t\t\t\t\t.prepend($lastImg)\n\t\t\t\t\t.animate({\n\t\t\t\t\t\t\"left\": \"0px\"\n\t\t\t\t\t}, opts.slideDuration);\n\n\n\t\t\t\t// text animation\n\t\t\t\t$txts\n\t\t\t\t\t.eq(index)\n\t\t\t\t\t.css(\"visibility\", \"hidden\")\n\t\t\t\t\t.end()\n\t\t\t\t\t.eq(getIndex(index-1, opts.length))\n\t\t\t\t\t.css(\"visibility\", \"visible\");\n\n\t\t\t\tindex = getIndex(index-1, opts.length);\n\n\t\t\t\tresizeControls();\n\n\t\t\t\treturn false;\n\t\t\t};\n\n\t\t\tvar next = function() {\n\t\t\t\t// img animation\n\t\t\t\t$sliderImg\n\t\t\t\t\t.animate({\n\t\t\t\t\t\t\"left\": \"-=\"+opts.imgWidth+\"px\"\n\t\t\t\t\t},\n\t\t\t\t\topts.slideDuration,\n\t\t\t\t\tfunction() {\n\t\t\t\t\t\tvar $firstImg = $(\".slider_img .img\", that).first().detach();\n\t\t\t\t\t\t$sliderImg\n\t\t\t\t\t\t\t.css({\n\t\t\t\t\t\t\t\t\"left\": 0\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t.append($firstImg);\n\t\t\t\t\t});\n\n\t\t\t\t// text animation\n\t\t\t\t$txts\n\t\t\t\t\t.eq(index)\n\t\t\t\t\t.css(\"visibility\", \"hidden\")\n\t\t\t\t\t.removeClass(\"active\")\n\t\t\t\t\t.end()\n\t\t\t\t\t.eq(getIndex(index+1, opts.length))\n\t\t\t\t\t.css(\"visibility\", \"visible\")\n\t\t\t\t\t.addClass(\"active\");\n\n\t\t\t\tindex = getIndex(index+1, opts.length);\n\n\t\t\t\tresizeControls();\n\n\t\t\t\treturn false;\n\t\t\t};\n\t\t\t\n\t\t\t$(\"a\", $txts).click(function() {\n\t\t\t\ttry {\n\t\t\t\t\t_gaq.push(['_trackEvent', 'mod_top_topics_zoom', 'Teaser-Überschrift', $(this).attr('title')]);\n\t\t\t\t} catch(e) {\n\t\t\t\t\tlog(\"ERROR: Google tracking failed in llTopTopics()\", e);\n\t\t\t\t}\n\t\t\t});\n\n\t\t\t$prev\n\t\t\t\t.click(function() {\n\t\t\t\t\tLL.actions.klick_top_themen_pfeil_zurueck();\n\t\t\t\t\twindow.clearInterval(interval);\n\t\t\t\t\tprev();\n\t\t\t\t})\n\t\t\t\t.show();\n\t\t\t$next\n\t\t\t\t.click(function() {\n\t\t\t\t\tLL.actions.klick_top_themen_pfeil_vor();\n\t\t\t\t\twindow.clearInterval(interval);\n\t\t\t\t\tnext();\n\t\t\t\t})\n\t\t\t\t.show();\n\n\t\t\t// start automatic rotation\n\t\t\tfunction startInterval() {\n\t\t\t\tinterval = window.setTimeout(function() {\n\t\t\t\t\tnext();\n\t\t\t\t}, options.interval);\n\t\t\t}\n\n\t\t\tresizeImages();\n\n\t\t\tif (opts.length > 1) {\n\t\t\t\tstartInterval();\n\t\t\t\tresizeControls();\n\t\t\t} else {\n\t\t\t\t$controls.hide();\n\t\t\t}\n\n\t\t\t$(window).resize(resizeImages);\n\t\t});\n\t};\n\n\n\t$.fn.llTopTopicsZoom = function( options ) {\n\n\t\tvar opts = $.extend({\n\t\t\t\"fadeDuration\": 1000,\n\t\t\t\"fadeTxtDuration\": 0,\n\t\t\t\"imgWidth\": 520,\n\t\t\t\"interval\": 5000,\n\t\t\t\"length\": 1,\n\t\t\t\"zoomPixel\": 60,\n\t\t\t\"zoomDuration\": 5000\n\t\t}, options);\n\n\t\treturn this.each(function() {\n\t\t\tif (opts.length <= 1) { return; }\n\n\t\t\tvar index = 0;\n\t\t\tvar interval;\n\t\t\tvar steps = Math.round( opts.zoomDuration / 48 );\n\t\t\tvar timeouts = [];\n\t\t\tvar $controls = $(\".prev, .next\", this);\n\t\t\tvar $prev = $(\".prev\", this);\n\t\t\tvar $next = $(\".next\", this);\n\t\t\tvar $imgs = $(\".slider_img .slide_cont .img\", this);\n\t\t\tvar $txts = $(\".slider_txt .unit\", this);\n\n\t\t\tfunction clearTimeouts() {\n\t\t\t\twindow.clearInterval( interval );\n\n\t\t\t\tfor(var t in timeouts) {\n\t\t\t\t\twindow.clearTimeout(timeouts[t]);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tvar resizeControls = function() {\n\t\t\t\tvar height = $txts.eq(index).outerHeight(false);\n\n\t\t\t\t$controls\n\t\t\t\t\t.height(height)\n\t\t\t\t\t.find(\"a\")\n\t\t\t\t\t.css({\n\t\t\t\t\t\t\"margin-top\": height / 2 - 18\n\t\t\t\t\t});\n\t\t\t};\n\n\n\t\t\tfunction animateImg( idx ) {\n\t\t\t\t$imgs\n\t\t\t\t\t.not( $imgs.eq(idx) )\n\t\t\t\t\t.fadeOut( opts.fadeDuration );\n\n\t\t\t\t$imgs\n\t\t\t\t\t.eq( idx )\n\t\t\t\t\t.fadeIn( opts.fadeDuration, function() {\n\t\t\t\t\t\t$imgs\n\t\t\t\t\t\t\t.not( $imgs.eq(idx) )\n\t\t\t\t\t\t\t.not( \".img_ad\" )\n\t\t\t\t\t\t\t.css({\n\t\t\t\t\t\t\t\t\"left\": 0,\n\t\t\t\t\t\t\t\t\"height\": opts.imgWidth,\n\t\t\t\t\t\t\t\t\"top\": -opts.zoomPixel,\n\t\t\t\t\t\t\t\t\"width\": opts.imgWidth\n\t\t\t\t\t\t\t});\n\t\t\t\t\t});\n\n\t\t\t\tif ( !$imgs.eq(idx).hasClass(\"img_ad\") ) {\n\t\t\t\t\tfor(var i = 0, timeout = 0; i < 48; i += 1, timeout += steps) {\n\t\t\t\t\t\t(function(timeout, offset) {\n\t\t\t\t\t\t\tvar t = window.setTimeout(function() {\n\t\t\t\t\t\t\t\t$imgs\n\t\t\t\t\t\t\t\t\t.eq( idx )\n\t\t\t\t\t\t\t\t\t.css({\n\t\t\t\t\t\t\t\t\t\t\"height\": \"+=2\",\n\t\t\t\t\t\t\t\t\t\t\"left\": \"-\" + offset + \"px\",\n\t\t\t\t\t\t\t\t\t\t\"top\": \"-\" + (opts.zoomPixel + offset) + \"px\",\n\t\t\t\t\t\t\t\t\t\t\"width\": \"+=2\"\n\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t}, timeout);\n\n\t\t\t\t\t\t\ttimeouts.push( t );\n\t\t\t\t\t\t})(timeout, i);\n\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t}\n\n\n\t\t\tfunction animateText( idx ) {\n\t\t\t\t$txts\n\t\t\t\t\t.not( $txts.eq(idx) )\n\t\t\t\t\t.css(\"visibility\", \"hidden\");\n\n\t\t\t\tresizeControls();\n\n\t\t\t\t$txts\n\t\t\t\t\t.eq( idx )\n\t\t\t\t\t.css(\"visibility\", \"visible\")\n\t\t\t\t\t.find('a')\n\t\t\t\t\t.bind('click', function() {\n\t\t\t\t\t\ttry{\n\t\t\t\t\t\t\t_gaq.push(['_trackEvent', 'mod_top_topics_zoom', 'Teaser-Überschrift', $(this).attr('title')]);\n\t\t\t\t\t\t} catch(e) {\n\t\t\t\t\t\t\tlog(\"ERROR: Google tracking failed in animateText()\", e);\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t}\n\n\n\n\t\t\tvar prev = function() {\n\t\t\t\tclearTimeouts();\n\t\t\t\tLL.actions.klick_top_themen_pfeil_zurueck();\n\t\t\t\tindex = getIndex( index - 1, opts.length);\n\t\t\t\tanimateImg(index);\n\t\t\t\tanimateText(index);\n\t\t\t\treturn false;\n\t\t\t};\n\n\t\t\tvar next = function() {\n\t\t\t\tclearTimeouts();\n\t\t\t\tLL.actions.klick_top_themen_pfeil_vor();\n\t\t\t\tindex = getIndex( index + 1, opts.length);\n\t\t\t\tanimateImg(index);\n\t\t\t\tanimateText(index);\n\t\t\t\treturn false;\n\t\t\t};\n\n\n\t\t\t// bind events and show controls\n\t\t\t$prev\n\t\t\t\t.click(prev)\n\t\t\t\t.show();\n\t\t\t$next\n\t\t\t\t.click(next)\n\t\t\t\t.show();\n\n\n\t\t\tfunction startInterval() {\n\t\t\t\tinterval = window.setInterval(function() {\n\t\t\t\t\tindex = getIndex( index + 1, opts.length );\n\t\t\t\t\tanimateImg(index);\n\t\t\t\t\tanimateText(index);\n\t\t\t\t}, options.interval);\n\t\t\t}\n\n\t\t\tanimateImg( 0 );\n\t\t\tanimateText( 0 );\n\t\t\tstartInterval();\n\t\t});\n\t};\n\n\n\t$.fn.llValidate = function() {\n\t\treturn this.each(function() {\n\t\t\tvar $form = $(this);\n\t\t\tvar formId = $form.attr(\"id\");\n\t\t\tvar action = $form.attr(\"action\");\n\n\t\t\t$form\n\t\t\t\t.submit(function() {\n\t\t\t\t\tvar data = $form.serialize();\n\t\t\t\t\t$form.load( action + \"?\" + data + \" #\" + formId);\n\t\t\t\t\treturn false;\n\t\t\t\t});\n\t\t});\n\t};\n\n\n\t$.fn.llVideo = function() {\n\t\treturn this.each(function() {\n\t\t\tvar that = this;\n\t\t\tvar $linkVideo = $(\".img_container a.img\", this);\n\n\t\t\t$linkVideo.live(\"click\", function(e) {\n\t\t\t\te.preventDefault();\n\n\t\t\t\t$(\"#layer\").llLayer({\n\t\t\t\t\t\"closeCallback\": function() {\n\t\t\t\t\t\t$(\"#layer\").html(\"\");\n\t\t\t\t\t},\n\t\t\t\t\t\"duration\": 0,\n\t\t\t\t\t\"url\": $(this).attr(\"href\")\n\t\t\t\t});\n\t\t\t\treturn false;\n\t\t\t});\n\t\t});\n\t};\n\n\n\t$.fn.llVideoBox = function() {\n\t\treturn this.each(function() {\n\t\t\tvar that = this;\n\t\t\tvar $linkVideo = $(\".bd a.img\", this);\n\t\t\tvar $linksBottom = $(\".ft a\", this);\n\n\t\t\t// add icons\n\t\t\tvar $prev = $(\"\");\n\t\t\tvar $next = $(\"\");\n\n\t\t\tvar deleteInlineScripts = function (dom) {\n\t\t\t\treturn dom.replace(/