PageSourceSearch

http://print-cip.ru/wp-content/themes/simplecorp/library/js/scripts.js

js print-cip.ru collected 2026-10-05 00:32:42 UTC 3,226 bytes, 74 lines download raw bytes

1/*
2This file should contain any js scripts you want to add to the site.
3Instead of calling it in the header or throwing it inside wp-head()
4this file will be called automatically in the footer so as not to
5slow the page load.
6*/
7
8// Modernizr.load loading the right scripts only if you need them
9Modernizr.load([
10	{
11    // Let's see if we need to load selectivizr
12    test : Modernizr.borderradius,
13    // Modernizr.load loads selectivizr for IE6-8
14    nope : ['selectivizr-min.js']
15	}
16]);
17
18/* imgsizer (flexible images for fluid sites) */
19var imgSizer={Config:{imgCache:[],spacer:"/path/to/your/spacer.gif"},collate:function(aScope){var isOldIE=(document.all&&!window.opera&&!window.XDomainRequest)?1:0;if(isOldIE&&document.getElementsByTagName){var c=imgSizer;var imgCache=c.Config.imgCache;var images=(aScope&&aScope.length)?aScope:document.getElementsByTagName("img");for(var i=0;i<images.length;i++){images[i].origWidth=images[i].offsetWidth;images[i].origHeight=images[i].offsetHeight;imgCache.push(images[i]);c.ieAlpha(images[i]);images[i].style.width="100%";}
20if(imgCache.length){c.resize(function(){for(var i=0;i<imgCache.length;i++){var ratio=(imgCache[i].offsetWidth/imgCache[i].origWidth);imgCache[i].style.height=(imgCache[i].origHeight*ratio)+"px";}});}}},ieAlpha:function(img){var c=imgSizer;if(img.oldSrc){img.src=img.oldSrc;}
21var src=img.src;img.style.width=img.offsetWidth+"px";img.style.height=img.offsetHeight+"px";img.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+src+"', sizingMethod='scale')"
22img.oldSrc=src;img.src=c.Config.spacer;},resize:function(func){var oldonresize=window.onresize;if(typeof window.onresize!='function'){window.onresize=func;}else{window.onresize=function(){if(oldonresize){oldonresize();}
23func();}}}}
24
25// as the page loads, cal these scripts
26jQuery(document).ready(function() {
27
28
29
30	// add all your scripts here
31
32
33}); /* end of as page load scripts */
34
35// HTML5 Fallbacks for older browsers 
36jQuery(function() {
37    // check placeholder browser support
38    if (!Modernizr.input.placeholder) {
39        // set placeholder values
40        jQuery(this).find('[placeholder]').each(function() {
41            jQuery(this).val( jQuery(this).attr('placeholder') );
42        });
43
44        // focus and blur of placeholders
45       jQuery('[placeholder]').focus(function() {
46            if (jQuery(this).val() == jQuery(this).attr('placeholder')) {
47                jQuery(this).val('');
48                jQuery(this).removeClass('placeholder');
49            }
50        }).blur(function() {
51            if (jQuery(this).val() == '' || jQuery(this).val() == jQuery(this).attr('placeholder')) {
52                jQuery(this).val(jQuery(this).attr('placeholder'));
53                jQuery(this).addClass('placeholder');
54            }
55        });
56
57        // remove placeholders on submit
58        jQuery('[placeholder]').closest('form').submit(function() {
59            jQuery(this).find('[placeholder]').each(function() {
60                if (jQuery(this).val() == jQuery(this).attr('placeholder')) {
61                    jQuery(this).val('');
62                }
63            });
64        });
65    }
66});
67
68
69
70
71
72
73
74

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.