var supports=(function(){ var div=document.createElement('div'), vendors='Khtml Ms O Moz Webkit'.split(' '), len=vendors.length; return function(prop){ if(prop in div.style) return true; prop=prop.replace(/^[a-z]/, function(val){ return val.toUpperCase(); }); while(len--){ if(vendors[len] + prop in div.style){ return true; }} return false; };})(); if(supports('perspective')){ jQuery(".the-menu").addClass("transition-active"); }else{ jQuery(".the-menu").removeClass("transition-active"); } jQuery(window).scroll(function(){ jQuery(".main-menu.sticky").each(function(){ var thisel=jQuery(this); var offset=thisel.offset(); var offsetz=thisel.children(".wrapper").offset(); var addpoint=0; if(jQuery("body").hasClass("admin-bar")){ addpoint=28; } if(jQuery(window).scrollTop()+addpoint >=offset.top){ thisel.css("height", thisel.height()+"px"); thisel.children(".wrapper").css("left", offsetz.left+"px").css("position", "fixed").css("top", addpoint+"px"); }else{ thisel.css("height", "auto"); thisel.children(".wrapper").css("position", "inherit").css("top", "0px").css("left", "auto"); }}); }); function playhover(){ jQuery(".hover-effect").each(function(){ var thisel=jQuery(this); if(thisel.has("img").length > 0&&!thisel.hasClass("delegate")){ var fontsize=(parseInt(thisel.children("img").height()) <=120)?20:(parseInt(thisel.children("img").height())/6); thisel.children("img").wrap("").parent().prepend(""); thisel.addClass("delegate"); }}); } var anihappening=false; jQuery(document).ready(function(){ playhover(); jQuery(".gallery-widget ul").each(function(){ var thisel=jQuery(this); var licount=thisel.children("li").length; thisel.attr("rel", licount); }); jQuery(".gallery-photo > a.slide-right").click(function(){ if(anihappening)return false; var thisel=jQuery(this).parent().children("ul"); var phwidth=parseInt(jQuery(this).parent().width()); if(((thisel.attr("rel")-1)*phwidth) > Math.abs(parseInt(thisel.css("margin-left")))){ anihappening=true; thisel.animate({'margin-left':'-='+phwidth}, 400, function (){ anihappening=false; }); } return false; }); jQuery(".gallery-photo > a.slide-left").click(function(){ if(anihappening)return false; var thisel=jQuery(this).parent().children("ul"); var phwidth=parseInt(jQuery(this).parent().width()); if(Math.abs(parseInt(thisel.css("margin-left"))) > 0){ anihappening=true; thisel.animate({'margin-left':'+='+phwidth}, 400, function (){ anihappening=false; }); } return false; }); jQuery(".tabs").each(function(){ var thisel=jQuery(this); thisel.children("div").css("min-height", (parseInt(thisel.css("height"))-30)+"px"); thisel.children("div").eq(0).addClass("active"); thisel.children("ul").children("li").eq(0).addClass("active"); }); jQuery(".tabs > ul > li a").click(function(){ var thisel=jQuery(this).parent(); thisel.siblings(".active").removeClass("active"); thisel.addClass("active"); thisel.parent().siblings("div.active").removeClass("active"); thisel.parent().siblings("div").eq(thisel.index()).addClass("active"); return false; }); jQuery('a[href="#close-alert"]').click(function(){ jQuery(this).parent().animate({ opacity: 0, padding: "0px 13px", margin: "0px", height: "0px" }, 300, function(){ }); return false; }); jQuery(".accordion > div > a").click(function(){ var thisel=jQuery(this).parent(); if(thisel.hasClass("active")){ thisel.removeClass("active"); return false; } thisel.siblings("div").removeClass("active"); thisel.addClass("active"); return false; }); jQuery(".header > .wrapper").prepend(''); jQuery(".lightbox").click(function (){ jQuery(".lightbox").css('overflow', 'hidden'); jQuery("body").css('overflow', 'auto'); jQuery(".lightbox .lightcontent").fadeOut('fast'); jQuery(".lightbox").fadeOut('slow'); }).children().click(function(e){ return false; }); }); function lightboxclose(){ jQuery(".lightbox").css('overflow', 'hidden'); jQuery(".lightbox .lightcontent").fadeOut('fast'); jQuery(".lightbox").fadeOut('slow'); jQuery("body").css('overflow', 'auto'); } (function($){ var methods = { init:function(options){ return this.each(function(){ var _this=$(this); _this.data('marquee',options); var _li=$('>li',_this); _this.wrap('
') .height(_this.height()) .hover(function(){if($(this).data('marquee').stop){$(this).stop(true,false);}}, function(){if($(this).data('marquee').stop){$(this).marquee('slide');}}) .parent() .css({position:'relative',overflow:'hidden','height':$('>li',_this).height()}) .find('>ul') .css({width:screen.width*2,position:'absolute'}); for(var i=0;ili',$this).width()*-1}, $this.data('marquee').duration, 'swing', function(){ $this.css('left',0).append($('>li:first',$this)); $this.delay($this.data('marquee').delay).marquee('slide'); } ); }}; $.fn.marquee=function(m){ var settings={ 'delay':4000, 'duration':2000, 'stop':false }; if(typeof m==='object'||! m){ if(m){ $.extend(settings, m); } return methods.init.apply(this, [settings]); }else{ return methods[m].apply(this); }};} )(jQuery); jQuery(document).ready(function(){jQuery('.breaking-news ul').marquee({delay:3000});} ); function printArticle(){ var html=jQuery(".block-content .shortcode-content").html(); var htmltitle=jQuery(".article-title h1").html(); if(jQuery(".main-article-content .article-photo img").size() > 0){var htmlphoto="";}else{var htmlphoto="";} if(jQuery(".logo-footer img").size() > 0){var htmllogo='
'+jQuery(".logo-footer").html()+'
';var logotext=false;}else{var htmllogo='
'+jQuery(".header-logo h1").html()+'
';var logotext=true;} var htmlcopy=jQuery(".footer .wrapper > p").html(); var htmlauthor=jQuery(".article-title .author .a-content b").html(); var htmldate=jQuery(".article-title .author .a-content > span.meta").html(); top.consoleRef=window.open('','articleprint', 'width=680,height=800' +',menubar=0' +',toolbar=1' +',status=0' +',scrollbars=1' +',resizable=1'); top.consoleRef.document.writeln(''+jQuery(document).attr('title')+'' +'
' +htmllogo +'

'+htmltitle+'

' +'
'+htmlauthor+''+htmldate+''+jQuery(location).attr('href')+'
' +'
'+htmlphoto+''+html+'
' +htmlcopy +'
' ); top.consoleRef.document.close(); } if(!localStorage.getItem('c_politic')){ jQuery('.politic-cockie-n').show(300); } jQuery('.politic-cockie-n__accept-btn').click(function(e){ e.preventDefault(); jQuery('.politic-cockie-n').hide(300); localStorage.setItem('c_politic', true); });