1/*###################### popup ##############################*/ 2function like_box_setCookie(cname, cvalue, exdays) { 3 var d = new Date(); 4 d.setTime(d.getTime() + (exdays*24*60*60*1000)); 5 var expires = "expires="+d.toUTCString(); 6 document.cookie = cname + "=" + cvalue + "; " + expires+"; path=/"; 7} 8function like_box_getCookie(cname) { 9 var name = cname + "="; 10 var ca = document.cookie.split(';'); 11 for(var i=0; i<ca.length; i++) { 12 var c = ca[i]; 13 while (c.charAt(0)==' ') c = c.substring(1); 14 if (c.indexOf(name) == 0) return c.substring(name.length,c.length); 15 } 16 return ""; 17} 18function like_box_resize_popup(){ 19 20 // popup resize width 21 if( like_box_initial_width > jQuery(window).width() ){ 22 jQuery('.facbook_like_box_popup iframe').css('width','100%') 23 jQuery('.facbook_like_box_popup').width((jQuery(window).width()-15)) 24 jQuery(".facbook_like_box_popup").css({marginLeft: '-' + parseInt((jQuery('.facbook_like_box_popup').width()/ 2),10) + 'px'}); 25 26 }else{ 27 if(jQuery('.facbook_like_box_popup').width()<like_box_initial_width){ 28 jQuery('.facbook_like_box_popup').width(Math.min((jQuery(window).width()-15),(like_box_initial_width))) 29 jQuery(".facbook_like_box_popup").css({marginLeft: '-' + parseInt((jQuery('.facbook_like_box_popup').width()/ 2),10) + 'px'}); 30 } 31 } 32 33 // popup resize height 34 if( like_box_initial_height > jQuery(window).height() ){ 35 jQuery('.facbook_like_box_popup').height((jQuery(window).height()-25)) 36 jQuery('.facbook_like_box_popup iframe').height((jQuery(window).height()-59)) 37 jQuery(".facbook_like_box_popup").css({marginTop: '-' + parseInt((jQuery('.facbook_like_box_popup').height()/ 2),10) + 'px'}); 38 39 }else{ 40 if(jQuery('.facbook_like_box_popup').height()<like_box_initial_height){ 41 jQuery('.facbook_like_box_popup').height(Math.min((jQuery(window).height()-25),(like_box_initial_height))) 42 jQuery('.facbook_like_box_popup iframe').height((jQuery(window).height()-59)) 43 jQuery(".facbook_like_box_popup").css({marginTop: '-' + parseInt((jQuery('.facbook_like_box_popup').height()/ 2),10) + 'px'}); 44 } 45 } 46} 47 48/*###################### Slideup ##############################*/ 49 50var like_box_slideup={ 51 initial_width:'220', 52 initial_height:'480', 53 initial_loaction:'left', 54 construct_function:function(){ 55 var self=this 56 if(jQuery('.main_sidbar_slide').css('left')=='auto') 57 this.initial_loaction='right'; 58 jQuery(window).resize(self.resize_height); 59 jQuery(window).resize(self.resize_width); 60 61 self.resize_width(); 62 jQuery('.sidbar_slide_header').click(function(){ 63 if(jQuery('.main_sidbar_slide').hasClass('like_box_slideup_close')){ 64 jQuery('.main_sidbar_slide').addClass('like_box_slideup_open'); 65 jQuery('.main_sidbar_slide').removeClass('like_box_slideup_close'); 66 67 } 68 else{ 69 jQuery('.main_sidbar_slide').addClass('like_box_slideup_close'); 70 jQuery('.main_sidbar_slide').removeClass('like_box_slideup_open'); 71 } 72 73 }); 74 }, 75 resize_height:function(){ 76 77 jQuery('.sidbar_slide_inner').css('max-height',jQuery(window).height()); 78 jQuery('.sidbar_slide_header').css('margin-top',parseInt((jQuery('.sidbar_slide_inner_main').height()-jQuery('.sidbar_slide_header').height())/2)+'px'); 79 80 }, 81 resize_width:function(){ 82 if(jQuery(window).width()<=jQuery('.main_sidbar_slide').width()) 83 { 84 85 if(!jQuery('#like_box_phone_slideup_style').length) 86 jQuery('body').append('<style id="like_box_phone_slideup_style">.sidbar_slide_content{width:'+(jQuery(window).width()-40)+'px;}.sidbar_slide_inner_main {width:'+jQuery(window).width()+'px;}.like_box_slideup_close{'+like_box_slideup.initial_loaction+':-'+(jQuery(window).width()-40)+'px;}</style>') 87 else 88 jQuery('#like_box_phone_slideup_style').html('.sidbar_slide_content{width:'+(jQuery(window).width()-40)+'px;}.sidbar_slide_inner_main{width:'+jQuery(window).width()+'px;}.like_box_slideup_close{'+like_box_slideup.initial_loaction+':-'+(jQuery(window).width()-40)+'px;}'); 89 } 90 else{ 91 if(jQuery('#like_box_phone_slideup_style').length) 92 jQuery('.like_box_phone_slideup_style').remove(); 93 } 94 95 }, 96 97 98 99} 100/*############################### ANImation Effekts ########################33*/ 101function like_box_animated_element(animation,element_id){ 102 jQuery('#'+element_id).ready(function(e) { 103 if(!jQuery(jQuery('#'+element_id)).hasClass('animated') && like_box_isScrolledIntoView(jQuery('#'+element_id))) { 104 jQuery(jQuery('#'+element_id)).css('visibility','visible'); 105 jQuery(jQuery('#'+element_id)).addClass('animated'); 106 jQuery(jQuery('#'+element_id)).addClass(animation); 107 } 108 }); 109} 110function like_box_isScrolledIntoView(elem) 111{ 112 var $elem = jQuery(elem); 113 if($elem.length=0) 114 return true; 115 var $window = jQuery(window); 116 var docViewTop = $window.scrollTop(); 117 var docViewBottom = docViewTop + $window.height(); 118 if(typeof(jQuery(elem).offset())!='undefined') 119 var elemTop = jQuery(elem).offset().top; 120 else
121 var elemTop = 0; 122 var elemBottom = elemTop + parseInt(jQuery(elem).css('height')); 123 return ( ( (docViewTop<=elemTop) && (elemTop<=docViewBottom) ) || ( (docViewTop<=elemBottom) && (elemBottom<=docViewBottom) )); 124} 125jQuery(document).ready(function(e) { 126 like_box_slideup.construct_function(); 127}); 128/*####################### other element resize ###################################*/ 129 130 131function like_box_set_width_cur_element(element_id,element_initial_width){ 132 var element_id='#'+element_id 133 // initial variables 134 var parent_width=jQuery(element_id).parent().width(); 135 var curent_src=jQuery(element_id).attr('src'); 136 // corect seted width 137 var element_initial_width=Math.min(500,parseInt(element_initial_width)); 138 var element_initial_width=Math.max(180,parseInt(element_initial_width)); 139 140 // corect width with parent element 141 142 if(parent_width<=180){ 143 curent_src=like_box_replace_src(curent_src,180) 144 jQuery(element_id).css('width',180); 145 } 146 if(parent_width>=180){ 147 curent_src=like_box_replace_src(curent_src,Math.min(element_initial_width,parent_width)); 148 jQuery(element_id).css('width',Math.min(element_initial_width,parent_width)); 149 } 150 //set replaced url 151 jQuery(element_id).attr('src',curent_src); 152} 153 154// replace url in src 155function like_box_replace_src(old_src,width){ 156 old_src=old_src.replace(/&width=[\d]+/,'&width='+parseInt(width)) 157 old_src=old_src.replace(/&container_width=[\d]+/,'&container_width='+parseInt(width)) 158 return old_src 159} 160 161 162 163 164 165 166 167 168 169
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.